public void OnStay(AiBossDargon aitank) { if (null != aitank.Player) { //aitank.animator.SetBool("Walk",false); aitank.Fsm.ChangState(AiBossDargon.Follow_STATE); } else { // Debug.Log("EE"); if (Time.time >= m_EndTime) { m_CurrentIndex++; if (m_CurrentIndex >= m_Point.Count) { aitank.NextPoint(); aitank.Fsm.ChangState(AiBossDargon.FirstPoint_STATE); return; } m_EndTime = Time.time + m_Point.Duration; } aitank.Rotate(m_Point.GetDirection(m_CurrentIndex)); } if (aitank.HP < 20) { aitank.Fsm.ChangState(AiBossDargon.FirstPoint2_STATE); } }
public void OnStay(AiBoss2 aiBoss2) { if (null != aiBoss2.Player) { aiBoss2.Fsm.ChangState(AiBoss2.CHASE22_STATE); } if (null != aiBoss2.Player) { Debug.Log("ChangScane"); // SceneManager.LoadScene(2); } else { if (Time.time >= m_EndTime) { m_CurrentIndex++; if (m_CurrentIndex >= m_Point.Count) { aiBoss2.NextPoint(); aiBoss2.Fsm.ChangState(AiBoss2.STATE_PRO); return; } m_EndTime = Time.time + m_Point.Duration; } aiBoss2.Rotate(m_Point.GetDirection(m_CurrentIndex)); } }
public void OnStay(Agent agent) { if (null != agent.Player) { agent.Fsm.ChangeState(Agent.CHASE_STATE); } else { if (Time.time >= m_EndTime) { m_CurrentIndex++; if (m_CurrentIndex >= m_Point.Count) { agent.NextPoint(); agent.Fsm.ChangeState(Agent.PATROL_STATE); return; } m_EndTime = Time.time + m_Point.Duration; } agent.Rotate(m_Point.GetDirection(m_CurrentIndex)); } }
public void OnStay(AiBoss2 aiBoss2) { aiBoss2.animator.SetBool("Confused", true); if (null != aiBoss2.Player) { aiBoss2.Fsm.ChangState(AiBoss2.CHASE_STATE); } if (null != aiBoss2.Player) { Debug.Log("ChangScane"); // SceneManager.LoadScene(2); } else { if (Time.time >= m_EndTime) { m_CurrentIndex++; if (m_CurrentIndex >= m_Point.Count) { aiBoss2.NextPoint(); aiBoss2.Fsm.ChangState(AiBoss2.PATROL_STATE); return; } m_EndTime = Time.time + m_Point.Duration; } aiBoss2.Rotate(m_Point.GetDirection(m_CurrentIndex)); } if (aiBoss2.HP < 10) { aiBoss2.Fsm.ChangState(AiBoss2.UPSTONE_STATE); } }