float GetStatisticsFloat() { DataPercentage player = statistics.CreatePlayerPercentageData(); float achieverScore = statistics.GetAchieverScore(player); float explorerScore = statistics.GetExplorerScore(player); float killerScore = statistics.GetKillerScore(player); float socializerScore = statistics.GetSocializerScore(player); return(Mathf.Max(statistics.GetAchieverScore(player), statistics.GetExplorerScore(player), statistics.GetKillerScore(player), statistics.GetSocializerScore(player))); }
string setPlayerProfile() { string errorMessage = "Not Enough Data"; DataPercentage player = statistics.CreatePlayerPercentageData(); float highestProfile = Mathf.Max(statistics.GetAchieverScore(player), statistics.GetExplorerScore(player), statistics.GetKillerScore(player), statistics.GetSocializerScore(player)); if (highestProfile == statistics.GetAchieverScore(player)) { return("Achiever"); } else if (highestProfile == statistics.GetExplorerScore(player)) { return("Explorer"); } else if (highestProfile == statistics.GetKillerScore(player)) { return("Killer"); } else if (highestProfile == statistics.GetSocializerScore(player)) { return("Socializer"); } return(errorMessage); }
void Start() { profileScores = new List <PlayerProfileScore>(); statistics = GameObject.FindGameObjectWithTag("Statistics").GetComponent <Statistics>(); player = statistics.CreatePlayerPercentageData(); profileCircles = GetComponentsInChildren <SubProfileCircle>(); fillProfileScores(); profileScores.Sort(); profileScores.Reverse(); assignCircles(); }