|
|
@@ -67,8 +67,8 @@ public class Boss : MoveCharacter
|
|
|
curState = states[curStateId];
|
|
|
toLargeSize = curState.scale;
|
|
|
beLarger = true;
|
|
|
- CalculateHp();
|
|
|
ChangeWeakness();
|
|
|
+ CalculateHp();
|
|
|
}
|
|
|
|
|
|
//切换弱点
|
|
|
@@ -82,13 +82,33 @@ public class Boss : MoveCharacter
|
|
|
w.totalHp = ws[i].Hp;
|
|
|
w.boss = this;
|
|
|
ws[i].obj.SetActive(true);
|
|
|
+ ws[i].obj.GetComponentInChildren<ParticleSystem>().Play();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public override void Init()
|
|
|
+ {
|
|
|
+ //确保组件不丢失
|
|
|
+ if (!ani)
|
|
|
+ {
|
|
|
+ ani = GetComponentInChildren<Animator>();
|
|
|
}
|
|
|
+
|
|
|
+ //血量重置
|
|
|
+ hp = totalHp;
|
|
|
+ uiHp.Show(hp, totalHp);
|
|
|
+ ChangeState(CharacterState.Idle);
|
|
|
+ }
|
|
|
+
|
|
|
+ private void Awake()
|
|
|
+ {
|
|
|
+
|
|
|
}
|
|
|
|
|
|
public void Start()
|
|
|
{
|
|
|
ChangeBossState();
|
|
|
- base.Init();
|
|
|
+ Init();
|
|
|
maxStateId = states.Length - 1;
|
|
|
}
|
|
|
|
|
|
@@ -125,6 +145,7 @@ public class Boss : MoveCharacter
|
|
|
coreWeakness.boss = this;
|
|
|
coreWeakness.isCore = true;
|
|
|
curState.core.SetActive(true);
|
|
|
+ curState.core.GetComponentInChildren<ParticleSystem>().Play();
|
|
|
}
|
|
|
}
|
|
|
|