public void setupPlayItemsScene() { PlayItemsEvent thisRound; GameManager gm = GameManager.Instance; if (gm.currentEvent().type != TimelineEventType.PlayItems) { Debug.LogError("In PlayItemsManager but current event type is " + gm.currentEvent().type); return; } else { thisRound = gm.currentEvent() as PlayItemsEvent; } // Start the timer. RopeTimer timerScript = TimerContainer.GetComponent <RopeTimer>(); timerScript.SetTimer(duration: (float)thisRound.duration); timerScript.StartTimer(); }
public void StartChoosing() { hitBuyIt = false; chooseItemsAnnouncement.SetActive(true); if (GameManager.Instance.currentEvent().type == TimelineEventType.ChooseItems) { GameEvent thisRound = GameManager.Instance.currentEvent(); loadBuyingPlayerFromEvent(); loadSellingPlayersFromGameManager(); carousel.initializeItems(Items); Debug.Log("Ending event after duration: " + thisRound.duration * 1.0f); rt.SetTimer(duration: (float)thisRound.duration); rt.StartTimer(); } else { Debug.LogError("Attempt to startSelling, but current event type is " + GameManager.Instance.currentEvent().type); } }