This commit is contained in:
pan@work
2024-07-29 17:04:03 +08:00
parent 5fa8794c09
commit cde0be7bcc
14 changed files with 245 additions and 53 deletions

View File

@@ -46,13 +46,9 @@ export class Hero extends ecs.Entity {
node.setPosition(pos)
node.setScale(1, 1, 1);
var mv = node.getComponent(HeroViewComp)!;
mv.speed=smc.heros[0].speed;
this.add(mv);
let speed = smc.heros[0].speed;
tween(node).to(speed/60, { position: new Vec3(0, -60, 0) }, {
onComplete: () => {
// this.as.walk();
}
}).start();
//移除全局列表
smc.heros.splice(0,1)
// console.log(ecs.query(ecs.allOf(HeroViewComp)))