卡牌技能位置

This commit is contained in:
2024-08-21 11:08:40 +08:00
parent a7f168dd72
commit 3f18763730
9 changed files with 81 additions and 15 deletions

View File

@@ -8,6 +8,7 @@ import { CardSet } from "../common/config/CardSet";
import { HeroCard } from "./HeroCard";
import { HeroModelComp } from "./HeroModelComp";
import { Hero } from "./Hero";
import { MonsterViewComp } from "./MonsterViewComp";
const { ccclass, property } = _decorator;
/** 视图层对象 */
@@ -100,8 +101,10 @@ export class HeroCardViewComp extends CCComp {
}
use_card(){
Hero
let heros = ecs.query(ecs.allOf(HeroModelComp))
// let heross= ecs.query(ecs.allOf(MonsterViewComp))
// console.log("heross",heross)
if(heros.length >= 4){
oops.gui.toast("英雄数量达到上限");
this.node.setPosition(this.pos_x,this.pos_y);