dd
This commit is contained in:
@@ -74,7 +74,7 @@ export class Boss extends ecs.Entity {
|
||||
var bs = node.getComponent(BossViewComp)!;
|
||||
// console.log("hero_init",buff)
|
||||
bs.speed =bs.ospeed = smc.monsters[uuid].speed;
|
||||
bs.hero_name= smc.monsters[uuid].name;
|
||||
bs.boos_name= smc.monsters[uuid].name;
|
||||
bs.hp= bs.hp_max = smc.monsters[uuid].hp;
|
||||
bs.level = smc.monsters[uuid].level;
|
||||
bs.atk = smc.monsters[uuid].atk;
|
||||
@@ -84,6 +84,7 @@ export class Boss extends ecs.Entity {
|
||||
bs.power_max = smc.monsters[uuid].power_max;
|
||||
bs.skill = smc.monsters[uuid].skill_uuid;
|
||||
bs.type = smc.monsters[uuid].type;
|
||||
bs.box_group = BoxSet.MONSTER;
|
||||
bs.scale = -1;
|
||||
bs.Tpos = v3(0,0,0);
|
||||
this.add(bs);
|
||||
|
||||
@@ -20,8 +20,8 @@ export class BossSpine extends Component {
|
||||
private default:string = "idle";
|
||||
private atk_name: string = "atk";
|
||||
private move_name: string = "move";
|
||||
private max_name: string = "max";
|
||||
private idel_name: string = "idle";
|
||||
private max_name: string = "atk";
|
||||
private idel_name: string = "move";
|
||||
start() {
|
||||
this.spine.setAnimation(0, this.default, true);
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ export class BossViewComp extends CCComp {
|
||||
atkMaterial: Material;
|
||||
sprite: Sprite;
|
||||
/** 角色动画 */
|
||||
|
||||
|
||||
|
||||
as:BossSpine =null!;
|
||||
is_role:boolean = false;
|
||||
@@ -43,8 +43,8 @@ export class BossViewComp extends CCComp {
|
||||
atk_enemy:any=null!;
|
||||
neraster_enemy:any=null!;
|
||||
/** 角色动画 */
|
||||
hero_uuid:number = 1001;
|
||||
hero_name : string = "role";
|
||||
boos_uuid:number = 1001;
|
||||
boos_name : string = "role";
|
||||
level:number =1;
|
||||
scale: number = 1; /** 角色阵营 1:hero -1 :monster */
|
||||
state: number = 1; /** 状态 1:move ,2: act 3: stop */
|
||||
@@ -168,6 +168,9 @@ export class BossViewComp extends CCComp {
|
||||
|
||||
|
||||
update(dt: number){
|
||||
if(smc.vm_data.game_over||smc.vm_data.game_pause){
|
||||
return
|
||||
}
|
||||
if (this.timer.update(dt)) {
|
||||
|
||||
}
|
||||
@@ -229,7 +232,7 @@ export class BossViewComp extends CCComp {
|
||||
let {pos,t_pos}=this.get_enemy_pos()
|
||||
pos.y=pos.y + y
|
||||
pos.x=pos.x + x
|
||||
skill.load(pos,BoxSet.HERO,this.node,skill_uuid,atk,t_pos);
|
||||
skill.load(pos,this.box_group,this.node,skill_uuid,atk,t_pos);
|
||||
// this.tooltip(3,smc.skills[skill_uuid].name,this.skill_uuid);
|
||||
}
|
||||
//使用max_skill
|
||||
@@ -282,7 +285,6 @@ export class BossViewComp extends CCComp {
|
||||
this.dead();
|
||||
this.is_dead = true;
|
||||
this.ent.remove(MoveToComp)
|
||||
smc.vm_data.game_over = true;
|
||||
setTimeout(() => {
|
||||
this.ent.destroy();
|
||||
}, 15);
|
||||
|
||||
Reference in New Issue
Block a user