示例#1
0
    public void LoadEnteredTraveler(TravelerTimerData timerData)
    {
        TravelerTimer timer = new TravelerTimer(timerData);

        timer.OnUsingStructure();
        curUsingQueue.Enqueue(timer);
        StartCoroutine(timer.UsingStructure(duration));
    }
示例#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);
        }
示例#3
0
 public void LoadWaitingTraveler(TravelerTimerData timerData)
 {
     curWaitingQueue.Enqueue(new TravelerTimer(timerData));
 }