Example #1
0
    IEnumerator ResumeGame()
    {
        Debug.Log("reset");
        PropsController.Instance.Restart();
        ResetPlayer(myPlayer, initMyPosition);
        ResetPlayer(oppoPlayer, initOppoPosition);
        footBall.SendMessage("Reset", initBallPosition, SendMessageOptions.DontRequireReceiver);
        mainCamera.SendMessage("CameraReset");
        Time.timeScale = 1f;
        Time3.Hide(false);
        yield return(new WaitForSeconds(1.0f));

        Time3.Hide(true);
        Time2.Hide(false);
        yield return(new WaitForSeconds(1.0f));

        Time2.Hide(true);
        Time1.Hide(false);
        yield return(new WaitForSeconds(1.0f));

        Time1.Hide(true);
        TexGo.Hide(false);
        StartGame();
        yield return(new WaitForSeconds(1.0f));

        TexGo.Hide(true);
    }