public MountedTurret(IReal wielder, Specs payload, float depth, float turnSpeed, float eleSpeed) : base(wielder, payload, depth) { TurnSpeed = turnSpeed; EleSpeed = eleSpeed; }
public MountedTurret(IReal wielder, Specs payload, Vector3 offset, float turnSpeed, float eleSpeed) : base(wielder, payload, offset) { TurnSpeed = turnSpeed; EleSpeed = eleSpeed; }
public Weapon(IReal wielder, Specs payload, Vector3 offset) : this(wielder, payload) { Angle = (float)Math.Atan2(offset.Y, offset.X); Length = new Vector2(offset.X, offset.Y).Length(); Depth = offset.Z; }
public Weapon(IReal wielder, Specs payload, float depth) : this(wielder, payload) { Angle = 0.0f; Length = 0.0f; Depth = depth; }
static Specs() { Shrapnel = new Specs(Munition.Cat.KE, 25.0f, 0.65f, 2); Grenade = new Specs(Munition.Cat.KE, 40.0f, 0.95f, true, true, 60, true, 3, 0.9f, 0, Shrapnel); Bullet = new Specs(Munition.Cat.KE, 40.0f, 40); Pulse = new Specs(Munition.Cat.EM, 32.0f, 20); }
protected void Fire(IReal shooter, Vector3 pos, Vector3 vel, Specs spec) { Shooter = shooter; Position = pos; Velocity = vel; Specification = spec; Gravitized = spec.Gravitized; Elasticity = spec.Elasticity; Aero = spec.Aero; Active = true; Bounces = 0; }
public Specs(Munition.Cat enType, float mv, float aero, bool grav, bool complex, int dam, bool bouncy, int maxBounce, float elas, int subNum, Specs submun) { EnType = enType; MuzzleVel = mv; Aero = aero; Gravitized = grav; Complex = complex; Damage = dam; Bouncy = bouncy; MaxBounces = maxBounce; Elasticity = elas; SubNumber = subNum; Submunition = submun; }
protected Weapon(IReal wielder, Specs payload) { Wielder = wielder; Payload = payload; }
public static void Fire(IReal shooter, Vector3 pos, float angle, float elevation, Specs spec) { // TODO: really wish this could be implemented in the manager somehow Munition toFire; if (Registry.MunMan.Stored.Count > 0) { toFire = Registry.MunMan.Stored[0]; } else { toFire = new Munition(); } toFire.Fire(shooter, pos, Gizmo.VectorFromAngles(angle, elevation, spec.MuzzleVel), spec); Registry.MunMan.Add(toFire); }