コード例 #1
0
    void Start()
    {
        ball = Instantiate(ball) as Pong2Ball;
        room = Instantiate(room) as Room;

        playerPaddle    = Instantiate(paddle) as Pong2Paddle;
        computerPaddle  = Instantiate(paddle) as Pong2Paddle;
        movingIndicator = Instantiate(indicator) as Indicator;

        playerPaddle.Init(true, ball, false);
        computerPaddle.Init(false, ball, false);
        movingIndicator.Init(true, ball, false);
        ball.Init(true);

        restartText.enabled   = false;
        restart.image.enabled = false;
        startTime             = Time.time;
    }