private static void calculatePlayerType() { Debug.Log(_achieverScore + " _ " + _explorerScore + " _ " + _killerScore + " _ " + _socializerScore); if (_achieverScore > _explorerScore && _achieverScore > _killerScore && _achieverScore > _socializerScore) { _playerType = Glob.PlayerTypes.Achiever; } else if (_explorerScore > _achieverScore && _explorerScore > _killerScore && _explorerScore > _socializerScore) { _playerType = Glob.PlayerTypes.Explorer; } else if (_killerScore > _achieverScore && _killerScore > _explorerScore && _killerScore > _socializerScore) { _playerType = Glob.PlayerTypes.Killer; } else if (_socializerScore > _achieverScore && _socializerScore > _explorerScore && _socializerScore > _killerScore) { _playerType = Glob.PlayerTypes.Socializer; } }
public void EnableResolutionScreen(Glob.PlayerTypes pPlayerType) { switch (pPlayerType) { case Glob.PlayerTypes.Achiever: _resolutionPlayerType.text = "You are an: " + Glob.AchieverType; _resolutionExplanation.text = Glob.AchieverExplain; _resolutionRecommendation.text = Glob.AchieverRecommend; break; case Glob.PlayerTypes.Explorer: _resolutionPlayerType.text = "You are an: " + Glob.ExplorerType; _resolutionExplanation.text = Glob.ExplorerExplain; _resolutionRecommendation.text = Glob.ExplorerRecommend; break; case Glob.PlayerTypes.Killer: _resolutionPlayerType.text = "You are a: " + Glob.KillerType; _resolutionExplanation.text = Glob.KillerExplain; _resolutionRecommendation.text = Glob.KillerRecommend; break; case Glob.PlayerTypes.Socializer: _resolutionPlayerType.text = "You are a: " + Glob.SocializerType; _resolutionExplanation.text = Glob.SocializerExplain; _resolutionRecommendation.text = Glob.SocializerRecommend; break; default: break; } float totalScore = GameInitializer.GetAchieverScore() + GameInitializer.GetExplorerScore() + GameInitializer.GetKillerScore() + GameInitializer.GetSocializerScore(); _resolutionStats.text = "Your stats: \n\nAchiever: " + Mathf.Round((GameInitializer.GetAchieverScore() / totalScore) * 100) + "% \nExplorer: " + Mathf.Round((GameInitializer.GetExplorerScore() / totalScore) * 100) + "% \nKiller: " + Mathf.Round((GameInitializer.GetKillerScore() / totalScore) * 100) + "% \nSocializer: " + Mathf.Round((GameInitializer.GetSocializerScore() / totalScore) * 100) + "%"; _resolutionScreen.SetActive(true); }