卡牌技能位置
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user