Exemple #1
0
    IEnumerator FindLocalPlayerControl()
    {
        yield return(new WaitForSeconds(3.0f));

        playerInput = GameObject.Find("GameState").GetComponent <GameStateManager> ().GetLocalPlayer().GetComponent <PlayerControl> ().input;
        if (playerInput == null)
        {
            StartCoroutine(FindLocalPlayerControl());
        }
    }
Exemple #2
0
	IEnumerator FindLocalPlayerControl() {
		yield return new WaitForSeconds (3.0f);
		playerInput = GameObject.Find ("GameState").GetComponent<GameStateManager> ().GetLocalPlayer ().GetComponent<PlayerControl> ().input;
		if (playerInput == null)
			StartCoroutine(FindLocalPlayerControl ());
	}