OnGameStateChange() public method

public OnGameStateChange ( EClientGameState eNewState ) : void
eNewState EClientGameState
return void
コード例 #1
0
    // 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);
            }
        }
    }
コード例 #2
0
    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);
        }
    }
コード例 #3
0
	private void OnEnable() {
		m_StatsAndAchievements = GameObject.FindObjectOfType<SteamStatsAndAchievements>();

		m_StatsAndAchievements.OnGameStateChange(EClientGameState.k_EClientGameActive);
	}
コード例 #4
0
    private void OnEnable()
    {
        m_StatsAndAchievements = GameObject.FindObjectOfType <SteamStatsAndAchievements>();

        m_StatsAndAchievements.OnGameStateChange(EClientGameState.k_EClientGameActive);
    }