示例#1
0
 public TravelerTimer(Traveler t, NotifyStateChange onUsing, NotifyStateChange onExit)
 {
     traveler         = t;
     OnUsingStructure = onUsing;
     OnExitStructure  = onExit;
     Tick             = new WaitForSeconds(1.0f);
 }
示例#2
0
        public TravelerTimer(TravelerTimerData timerData)
        {
            switch (timerData.travelerType)
            {
            case ActorType.Traveler:
                traveler = GameManager.Instance.travelersEnabled[timerData.travelerIndex].GetComponent <Traveler>();
                break;

            case ActorType.Adventurer:
                traveler = GameManager.Instance.adventurersEnabled[timerData.travelerIndex].GetComponent <Adventurer>();
                break;

            case ActorType.SpecialAdventurer:
                traveler = GameManager.Instance.specialAdventurers[timerData.travelerIndex].GetComponent <SpecialAdventurer>();
                break;
            }

            OnUsingStructure = traveler.OnUsingStructure;
            OnExitStructure  = traveler.OnExitStructure;
            Tick             = new WaitForSeconds(1.0f);
        }