// Public function to check whether a particular keycard has been collected public bool HasKeyCard(KeyCards index) { return m_keyCards[(int)index]; }
void DaysOfWeek() { if (ketCardCounter.monday == true) { if (timerScript.currentTime >= 50) { keyCardselected = KeyCards.KeyCard1; } if (timerScript.currentTime >= 40 && timerScript.currentTime <= 50) { keyCardselected = KeyCards.KeyCard2; } if (timerScript.currentTime >= 30 && timerScript.currentTime <= 40) { keyCardselected = KeyCards.KeyCard3; } if (timerScript.currentTime >= 20 && timerScript.currentTime <= 30) { keyCardselected = KeyCards.KeyCard4; } if (timerScript.currentTime >= 10 && timerScript.currentTime <= 20) { keyCardselected = KeyCards.KeyCard5; } if (timerScript.currentTime >= 0 && timerScript.currentTime <= 10) { keyCardselected = KeyCards.KeyCard6; } } if (ketCardCounter.tuesday == true) { if (timerScript.currentTime >= 50) { keyCardselected = KeyCards.KeyCard3; } if (timerScript.currentTime >= 40 && timerScript.currentTime <= 50) { keyCardselected = KeyCards.KeyCard5; } if (timerScript.currentTime >= 30 && timerScript.currentTime <= 40) { keyCardselected = KeyCards.KeyCard1; } if (timerScript.currentTime >= 20 && timerScript.currentTime <= 30) { keyCardselected = KeyCards.KeyCard4; } if (timerScript.currentTime >= 10 && timerScript.currentTime <= 20) { keyCardselected = KeyCards.KeyCard6; } if (timerScript.currentTime >= 0 && timerScript.currentTime <= 10) { keyCardselected = KeyCards.KeyCard2; } } if (ketCardCounter.wednesday == true) { if (timerScript.currentTime >= 50) { keyCardselected = KeyCards.KeyCard5; } if (timerScript.currentTime >= 40 && timerScript.currentTime <= 50) { keyCardselected = KeyCards.KeyCard4; } if (timerScript.currentTime >= 30 && timerScript.currentTime <= 40) { keyCardselected = KeyCards.KeyCard3; } if (timerScript.currentTime >= 20 && timerScript.currentTime <= 30) { keyCardselected = KeyCards.KeyCard1; } if (timerScript.currentTime >= 10 && timerScript.currentTime <= 20) { keyCardselected = KeyCards.KeyCard6; } if (timerScript.currentTime >= 0 && timerScript.currentTime <= 10) { keyCardselected = KeyCards.KeyCard2; } } if (ketCardCounter.thursday == true) { if (timerScript.currentTime >= 50) { keyCardselected = KeyCards.KeyCard1; } if (timerScript.currentTime >= 40 && timerScript.currentTime <= 50) { keyCardselected = KeyCards.KeyCard3; } if (timerScript.currentTime >= 30 && timerScript.currentTime <= 40) { keyCardselected = KeyCards.KeyCard5; } if (timerScript.currentTime >= 20 && timerScript.currentTime <= 30) { keyCardselected = KeyCards.KeyCard2; } if (timerScript.currentTime >= 10 && timerScript.currentTime <= 20) { keyCardselected = KeyCards.KeyCard4; } if (timerScript.currentTime >= 0 && timerScript.currentTime <= 10) { keyCardselected = KeyCards.KeyCard6; } } if (ketCardCounter.friday == true) { if (timerScript.currentTime >= 50) { keyCardselected = KeyCards.KeyCard5; } if (timerScript.currentTime >= 40 && timerScript.currentTime <= 50) { keyCardselected = KeyCards.KeyCard3; } if (timerScript.currentTime >= 30 && timerScript.currentTime <= 40) { keyCardselected = KeyCards.KeyCard1; } if (timerScript.currentTime >= 20 && timerScript.currentTime <= 30) { keyCardselected = KeyCards.KeyCard4; } if (timerScript.currentTime >= 10 && timerScript.currentTime <= 20) { keyCardselected = KeyCards.KeyCard6; } if (timerScript.currentTime >= 0 && timerScript.currentTime <= 10) { keyCardselected = KeyCards.KeyCard2; } } }
// Function to collect key cards // Call this function using gameStateManager.BroadcastMessage("CollectKeyCard", GameStateManager.KeyCards.colour) public void CollectKeyCard(KeyCards index) { Debug.Log("Collected key card " + index); statusManager.SetStatus(KEY_CARD_NAMES[(int)index] + " key card collected"); keyManager.CollectKey(index); m_keyCards[(int)index] = true; }