|
@@ -166,7 +166,8 @@ export class Enemy extends BaseExp {
|
|
|
//恢复初始雪条
|
|
|
this.hpBar.progress = 1;
|
|
|
this.hpBar.node.active = false;
|
|
|
- this.endFire();
|
|
|
+ this.endFire();
|
|
|
+ this.schedule(this.updateAAAA.bind(this),0.016199);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -400,18 +401,6 @@ export class Enemy extends BaseExp {
|
|
|
*/
|
|
|
public showHurt(hpStr: string) {
|
|
|
if(Game.I.isGameOver || this.isDead) return;
|
|
|
- //敌人流血特效
|
|
|
- ResUtil.playParticle(
|
|
|
- `effects/Prefabs/blood`,
|
|
|
- 1,
|
|
|
- new Vec3(0.2,0.2,0.2),
|
|
|
- (blood) => {
|
|
|
- blood.active = true;
|
|
|
- blood.parent = this.enemyNode.parent;
|
|
|
- const targetPos: Vec3 = this.enemyNode.worldPosition.clone();
|
|
|
- blood.worldPosition = new Vec3(targetPos.x,targetPos.y - 0.2,targetPos.z);
|
|
|
- }
|
|
|
- );
|
|
|
//创建3D伤害数字
|
|
|
const n = PoolManager.getNode(this.hurt_num, this.hurt_num.parent);
|
|
|
let label:Label = n.getComponent(Label);
|
|
@@ -531,7 +520,7 @@ export class Enemy extends BaseExp {
|
|
|
/**
|
|
|
* 更新敌人行走和变化方向
|
|
|
*/
|
|
|
- protected update(dt: number): void {
|
|
|
+ protected updateAAAA(dt: number): void {
|
|
|
if(Game.I.isGameOver
|
|
|
|| Game.I.isPause
|
|
|
|| !this.data
|