示例#1
0
        //-------------------------------------------------------------------------------------------------------------
        private void changeState(WAYPOINTSTATE _state)
        {
            m_wayPointState = _state;
            switch (_state)
            {
            case (WAYPOINTSTATE.OCCUPIED):
                HideWaypoint();
                break;

            case (WAYPOINTSTATE.IDLE):
                if (WaypointRoot != null)
                {
                    ActivateWayPointAsset();
                }
                ShowWaypoint();
                break;

            case (WAYPOINTSTATE.INACTIVE):
                if (WaypointRoot != null)
                {
                    DeactivateWayPointAsset();
                }
                break;
            }
        }
示例#2
0
 //-------------------------------------------------------------------------------------------------------------
 void Awake()
 {
     WaypointState = WAYPOINTSTATE.INACTIVE;
     m_player      = GameObject.FindGameObjectWithTag("Player");
     AddEventListeners();
 }//-------------------------------------------------------------------------------------------------------------
示例#3
0
 //-------------------------------------------------------------------------------------------------------------
 private void OnOccupy()
 {
     WaypointState = WAYPOINTSTATE.OCCUPIED;
     OnOccupiedEvent.Invoke();
 }
示例#4
0
 //-------------------------------------------------------------------------------------------------------------
 public void OnWaypointLeave()
 {
     WaypointState = WAYPOINTSTATE.IDLE;
     OnLeaveEvent.Invoke();
 }