Пример #1
0
    public void Recalculate()
    {
        m_target          = null;
        m_Path            = null;
        Movement_Watchdog = false;
        switch (m_State)
        {
        case Security_State.Patrol:
        {
            m_target = m_Path_Manager.Get_Random_Node(null);
            break;
        }

        case Security_State.Chase:
        {
            if (m_Enemy_Agent != null && m_Enemy_Position != null)
            {
                m_target = m_Path_Manager.Get_Nearest_Node(m_Enemy_Position.position);
            }
            break;
        }
        }
        if (m_target != null)
        {
            Calculate_Path();
            Check_Pathing();
        }
    }
 public void Recalculate()
 {
     m_target = null;
     m_Path   = null;
     m_target = m_Path_Manager.Get_Random_Node(null);
     Calculate_Path();
     Check_Pathing();
 }