This commit is contained in:
2024-08-13 17:06:10 +08:00
parent 825457fd0e
commit 876a56c8c1
17 changed files with 2156 additions and 610 deletions

View File

@@ -20,11 +20,9 @@ export class HeroCard extends ecs.Entity {
// 视图层
protected init() {
// this.addComponents<ecs.Comp>(
// MonsterModelComp);
}
destroy(): void {
@@ -34,7 +32,7 @@ export class HeroCard extends ecs.Entity {
/** 加载角色 */
load(pos: Vec3 = Vec3.ZERO,uuid:number=1001,parent:Node) {
console.log("load hero",uuid);
// console.log("load hero",uuid);
// var path = "game/monster/"+prefab_path;
var path = "game/heros/cards/hero_card";
var prefab: Prefab = oops.res.get(path, Prefab)!;

View File

@@ -70,6 +70,7 @@ export class HeroCardViewComp extends CCComp {
this.ent.destroy();
smc.vm_data.gold.min -= CardSet[this.card_uid].level;
}else{
oops.gui.toast("金币不够");
this.node.setPosition(this.pos_x,this.pos_y);
}
}