コード例 #1
0
    public void NewGame()
    {
        ResetGame();

        levelCreator.MakeWall();
        GameObject.Destroy(currentPlatform);
        currentPlatform = null;
        MakeMovingPlatform();

        coinSound.Play();
        themeSong.PlayDelayed(1.0f);

        ball.GetComponent <Transform> ().position = ballRespawnTransform.position;
        ball.GetComponent <Rigidbody> ().velocity = Vector3.zero;

        GameObject.Destroy(currentUI);
        currentUI = (GameObject)Instantiate(Resources.Load("InGameUI"));
        state     = GameState.InGame;
        cameraLogic.AdjustBehaviour();
    }