示例#1
0
    private void FixedUpdate()
    {
        if (platforms.Count > 0 && shouldPlatformsMove)
        {
            UpdatePlatforms();
        }
        switch (gameState)
        {
        case GAME_STATE.PRE_START:
            break;

        case GAME_STATE.IN_PLAY:
            Time.timeScale += 0.015f * Time.fixedDeltaTime;
            ball.UpdateMovement();
            if (ball.transform.position.y <= bottomOfScreen)
            {
                EndGame();
            }
            timer.UpdateScore();
            break;

        default:
            break;
        }
    }