GameOverReason CheckGameOver(CardMovement card) { CardData.Settings cardData = card.GetCardData(); if (cardData == null) { return(GameOverReason.OutOfCards); } if (cardManager._yearsPassed > MAX_AGE) { return(GameOverReason.Aged); } if (cardManager.loveLevel <= 0) { return(GameOverReason.NoLove); } if (cardManager.loveLevel >= MAX_LEVEL) { return(GameOverReason.FullLove); } if (cardManager.moneyLevel <= 0) { return(GameOverReason.NoMoney); } if (cardManager.moneyLevel >= MAX_LEVEL) { return(GameOverReason.FullMoney); } if (cardManager.healthLevel <= 0) { return(GameOverReason.NoHealth); } if (cardManager.healthLevel >= MAX_LEVEL) { return(GameOverReason.FullHealth); } if (cardManager.familyLevel <= 0) { return(GameOverReason.NoFun); } if (cardManager.familyLevel >= MAX_LEVEL) { return(GameOverReason.FullFun); } return(GameOverReason.Alive); }
void DisplayCardData(CardMovement card) { card.SetCardIdle(); question.text = card.GetCardData().cardText; }