// Use this for initialization public void Start() { if (m_StatsAndAchievements == null) { m_StatsAndAchievements = GameObject.FindObjectOfType <SteamStatsAndAchievements>(); if (m_StatsAndAchievements != null) { m_StatsAndAchievements.OnGameStateChange(EClientGameState.k_EClientGameActive); } } }
private void OnGUI() { m_StatsAndAchievements.Render(); GUILayout.Space(10); if (GUILayout.Button("Set State to Active")) { m_StatsAndAchievements.OnGameStateChange(EClientGameState.k_EClientGameActive); } if (GUILayout.Button("Set State to Winner")) { m_StatsAndAchievements.OnGameStateChange(EClientGameState.k_EClientGameWinner); } if (GUILayout.Button("Set State to Loser")) { m_StatsAndAchievements.OnGameStateChange(EClientGameState.k_EClientGameLoser); } if (GUILayout.Button("Add Distance Traveled +100")) { m_StatsAndAchievements.AddDistanceTraveled(100.0f); } }
private void OnEnable() { m_StatsAndAchievements = GameObject.FindObjectOfType<SteamStatsAndAchievements>(); m_StatsAndAchievements.OnGameStateChange(EClientGameState.k_EClientGameActive); }
private void OnEnable() { m_StatsAndAchievements = GameObject.FindObjectOfType <SteamStatsAndAchievements>(); m_StatsAndAchievements.OnGameStateChange(EClientGameState.k_EClientGameActive); }