public void LoadEnteredTraveler(TravelerTimerData timerData) { TravelerTimer timer = new TravelerTimer(timerData); timer.OnUsingStructure(); curUsingQueue.Enqueue(timer); StartCoroutine(timer.UsingStructure(duration)); }
public void EnterTraveler() { if (curWaitingQueue.Count > 0) { TravelerTimer t = curWaitingQueue.Dequeue(); t.OnUsingStructure(); curUsingQueue.Enqueue(t); StartCoroutine(t.UsingStructure(duration)); } Debug.Log(names + "-----------------------Current Using Queue Size = " + curUsingQueue.Count + "/" + capacity); }