public void SetResiliencesFinal() { myaction.actionUse += 1; if (myaction.actionType != ModelActions.ActionType.Challenger) { GameManagerResilience.GetInstance().CallEventUpdateResiliences((int)myaction.physic, (int)myaction.mental, (int)myaction.social, (int)myaction.emotional); if (myaction.actionType == ModelActions.ActionType.Sleep) { float recovery = GameManager.GetInstance().GetResiliencePerMin(GameManager.Resiliences.Recovery) * myaction.duration; GameManagerResilience.GetInstance().CallEventRecoveryStress((int)recovery); } } else { GameManagerResilience.GetInstance().CallEventUpdateResiliences(-(int)myaction.physic, -(int)myaction.mental, -(int)myaction.social, -(int)myaction.emotional); if (myaction.satisfactionCost > 0) { if (GameManagerResilience.GetInstance().TotalSatisfaction - myaction.satisfactionCost >= 0) { GameManagerResilience.GetInstance().TotalSatisfaction = -myaction.satisfactionCost; } else { GameManagerResilience.ResetSatisfaction(); } } } }
ModelLeaderBoard Player() { ModelLeaderBoard player = new ModelLeaderBoard(); player.isPlayer = true; player.myface = playerFace; player.myMental = GameManagerResilience.mentalTimes; player.myPhysics = GameManagerResilience.physicsTimes; player.mySocial = GameManagerResilience.socialTimes; player.myEmotional = GameManagerResilience.emotionaltimes; player.mySatisfaction = GameManagerResilience.GetInstance().TotalSatisfaction; return(player); }
private void OnEnable() { GameManagerLeaderBoard.GetInstance().PopulateList(GameManagerResilience.GetInstance().TotalSatisfaction); }
void SetInitialReferences() { gmr = GameManagerResilience.GetInstance(); }