Commit 487c9ab7 authored by wanqing's avatar wanqing

修改代码

parent 13c32f10
...@@ -26,6 +26,7 @@ public class BossView : MonoBehaviour ...@@ -26,6 +26,7 @@ public class BossView : MonoBehaviour
private Vector3 m_movePointA; private Vector3 m_movePointA;
private Vector3 m_movePointB; private Vector3 m_movePointB;
private bool m_bIsForWard = true;//是否正向运动,开始默认正向 private bool m_bIsForWard = true;//是否正向运动,开始默认正向
private bool m_bIsDie = false;//是否死亡
// Start is called before the first frame update // Start is called before the first frame update
void Start() void Start()
{ {
...@@ -42,11 +43,13 @@ public class BossView : MonoBehaviour ...@@ -42,11 +43,13 @@ public class BossView : MonoBehaviour
//死亡 //死亡
public void Die() public void Die()
{ {
m_bIsDie = true;
m_animator.Play("Die"); m_animator.Play("Die");
} }
//重置状态 //重置状态
public void ResetState() public void ResetState()
{ {
m_bIsDie = false;
m_animator.Play("Run"); m_animator.Play("Run");
m_time = 0.0f; m_time = 0.0f;
m_index = 1; m_index = 1;
...@@ -145,7 +148,7 @@ public class BossView : MonoBehaviour ...@@ -145,7 +148,7 @@ public class BossView : MonoBehaviour
//移动 //移动
void UpdateMove() void UpdateMove()
{ {
if(m_isMove) if(m_isMove && !m_bIsDie)
{ {
Vector3 varDir; Vector3 varDir;
if (m_bIsForWard) if (m_bIsForWard)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment