This commit is contained in:
pan@work
2024-08-01 16:53:02 +08:00
parent 6c5d417ad1
commit 904a60b04f
9 changed files with 610 additions and 281 deletions

View File

@@ -47,12 +47,11 @@ export class Monster extends ecs.Entity {
node.getChildByName("avatar").setScale(node.getChildByName("avatar").scale.x*camp, node.getChildByName("avatar").scale.y, node.getChildByName("avatar").scale.z);
node.setPosition(pos)
var mv = node.getComponent(MonsterViewComp)!;
console.log('speed:'+speed)
mv.speed =mv.ospeed = speed;
mv.hero_name= name;
mv.camp = camp;
mv.Tpos = v3(0,0,0);
mv.change_name(name)
mv.change_name(name,camp)
this.add(mv);
if(camp == 1){
smc.heros_in.push({name:mv.ent.name,eid:mv.ent.eid,pos_x:0})