public TravelerTimer(Traveler t, NotifyStateChange onUsing, NotifyStateChange onExit) { traveler = t; OnUsingStructure = onUsing; OnExitStructure = onExit; Tick = new WaitForSeconds(1.0f); }
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); }