IEnumerator GameCleanupPhase() { Debug.Log($"Cleanup End of Round"); if (_ch.happyMeter.IsMeterFull()) { Debug.Log($"WIN"); SceneKeeper.LoadWinScene(); } if (_ch.hungerMeter.IsMeterFull()) { Debug.Log($"LOSE"); SceneKeeper.LoadLoseScene(); } if (_ch.dirtyMeter.IsMeterFull()) { Debug.Log($"LOSE"); SceneKeeper.LoadLoseScene(); } yield return(new WaitForSeconds(0.5f)); gameState = GameState.None; }
public void ExecuteCard(Card cardToExecute) { switch (cardToExecute.cardInfo.cardSuit) { case Suits.Happy: happyMeter.AdjustValue(cardToExecute.cardInfo.cardValue); break; case Suits.Hungry: hungerMeter.AdjustValue(cardToExecute.cardInfo.cardValue); break; case Suits.Dirty: dirtyMeter.AdjustValue(cardToExecute.cardInfo.cardValue); break; case Suits.Yellow: sanityMeter.AdjustValue(cardToExecute.cardInfo.cardValue); break; } if (cardToExecute.cardInfo.handInUse.isFish) { _cfm.SadAudio(); } else { switch (cardToExecute.cardInfo.cardSuit) { case Suits.Happy: _cfm.HappyAudio(); break; case Suits.Hungry: _cfm.HungerAudio(); break; case Suits.Dirty: _cfm.CleanAudio(); break; case Suits.Yellow: _cfm.HappyAudio(); break; } } if (_ch.happyMeter.IsMeterFull()) { Debug.Log($"WIN"); SceneKeeper.LoadWinScene(); } if (_ch.hungerMeter.IsMeterFull()) { Debug.Log($"LOSE"); SceneKeeper.LoadLoseScene(); } if (_ch.dirtyMeter.IsMeterFull()) { Debug.Log($"LOSE"); SceneKeeper.LoadLoseScene(); } Debug.Log($"played + {cardToExecute.name}"); }