public static Bullet Bullet <TAmmoType>(Vec2 position, AmmoTypeModifier modifier, Thing owner = null, float angleDegress = 0, Thing firedFrom = null) where TAmmoType : AmmoType, new() { var ammoType = FastNew.CreateInstance <TAmmoType>(); modifier(ref ammoType.bulletSpeed, ref ammoType.range); return(ammoType.FireBullet(position, owner, angleDegress, firedFrom)); }
public static Bullet Bullet <TAmmoType>(float x, float y, AmmoTypeModifier modifier, Thing owner = null, float angleDegress = 0, Thing firedFrom = null) where TAmmoType : AmmoType, new() => Bullet <TAmmoType>(new Vec2(x, y), modifier, owner, angleDegress, firedFrom);