コード例 #1
0
    public static Bullet Shoot(GameObject bulletPrefab, Vector3 position, Quaternion rotation, float power)
    {
        GameObject bulletGo = Instantiate <GameObject>(bulletPrefab, position, rotation);
        Bullet     bullet   = bulletGo.GetComponent <Bullet>();

        bullet.BeShotOnNextFrame(new Vector3(power, 0, 0));

        return(bullet);
    }