コード例 #1
0
    void Update()
    {
        RB.velocity += new Vector2(RB.velocity.x * SpeedUpValue, RB.velocity.y * SpeedUpValue);

        if (Ball.transform.position.x < -5000)
        {
            spawner.DisableBall();
        }
        else if (Ball.transform.position.x > 5000)
        {
            spawner.DisableBall();
        }

        if (RB.velocity.x != 0)
        {
            RB.velocity = Maxvelocity(); // the y speed relative to x need to be fixt
        }
    }