Beispiel #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;
            }
        }
Beispiel #2
0
 //-------------------------------------------------------------------------------------------------------------
 void Awake()
 {
     WaypointState = WAYPOINTSTATE.INACTIVE;
     m_player      = GameObject.FindGameObjectWithTag("Player");
     AddEventListeners();
 }//-------------------------------------------------------------------------------------------------------------
Beispiel #3
0
 //-------------------------------------------------------------------------------------------------------------
 private void OnOccupy()
 {
     WaypointState = WAYPOINTSTATE.OCCUPIED;
     OnOccupiedEvent.Invoke();
 }
Beispiel #4
0
 //-------------------------------------------------------------------------------------------------------------
 public void OnWaypointLeave()
 {
     WaypointState = WAYPOINTSTATE.IDLE;
     OnLeaveEvent.Invoke();
 }