This commit is contained in:
2024-09-04 14:31:45 +08:00
parent 56ab1fab29
commit ad52a9ad9c
12 changed files with 2194 additions and 2026 deletions

View File

@@ -47,9 +47,9 @@ export class Role extends ecs.Entity {
var node = instantiate(prefab);
var scene = smc.map.MapView.scene;
node.parent = scene.entityLayer!.node!;
node.setScale(1.5*node.scale.x, 1.5*node.scale.y, node.scale.z);
node.setScale(node.scale.x, node.scale.y, node.scale.z);
// var as = node.getComponent(MonsterSpine);
// node.setPosition(pos)
node.setPosition(pos)
// console.log(node.getChildByName("avatar").getChildByName("TNode").getChildByName("bb").getComponent(Sprite))
// const url = 'game/heros/player';
// resources.load(url, SpriteAtlas, (err: any, atlas) => {

View File

@@ -97,7 +97,7 @@ export class RoleViewComp extends CCComp {
this.as.atk();
this.scheduleOnce(()=>{
this.shoot(this.skill_uuid);
},0.5)
},1)
}
shoot(skill_uuid:number){

View File

@@ -236,7 +236,7 @@ export class MonsterViewComp extends CCComp {
this.as.atk();
this.scheduleOnce(()=>{
this.shoot(this.skill_uuid);
},0.2)
},0.4)
}
}else{
this.atk_time += dt;