コード例 #1
0
    void Shoot()
    {
        GameObject cb       = Instantiate(cannonBall, barrel.position, barrel.rotation);
        CannonBall cbScript = cb.GetComponent <CannonBall>();

        cbScript.speed = ballSpeed;
        cbScript.GoFast();
    }