예제 #1
0
    public static Projectile AddProjectileFrom(this Gun gun, Gun other, bool cloned = true)
    {
        if (other.DefaultModule.projectiles.Count == 0)
        {
            return(null);
        }
        Projectile p = other.DefaultModule.projectiles[0];

        if (p == null)
        {
            return(null);
        }
        return(gun.AddProjectile(!cloned ? p : p.ClonedPrefab()));
    }