public Ship(Vector pos, Game game, ParticleEngine particleEngine, Arena arena) { position = pos; gameref = game; particles = particleEngine; arenaref = arena; }
public SimpleBullet(Ship parent, double x, double y, double angle, double magnitude, Arena arena) : base(parent, x, y, true, arena, 4, 4) { bulletSprite = new Sprite(parent.GameRef.Resources.GetSpriteDescriptor("bullet"), parent.GameRef.Resources); this.angle = angle; this.magnitude = magnitude; }
public static Component CreateComponent(string type, Ship parent, double x, double y, Arena arena) { switch (type) { case "SimpleGunTurret": return new SimpleGunTurret(parent, x, y, arena); default: return null; } }
private double x, y; //Relative position from parent if absolutePosition is false, absolute position otherwise #endregion Fields #region Constructors /// <summary> /// Construct a new /// </summary> /// <param name="parent"> /// A <see cref="Ship"/> /// </param> /// <param name="x"> /// A <see cref="System.Double"/> /// </param> /// <param name="y"> /// A <see cref="System.Double"/> /// </param> public Component(Ship parent, double x, double y, bool absolutePosition, Arena arena, int width, int height) { this.height = height; this.width = width; this.parent = parent; this.x = x; this.y = y; this.absolutePosition = absolutePosition; this.arenaref = arena; id = idCounter; idCounter++; }
public SimpleGunTurret(Ship parent, double x, double y, Arena arena) : base(parent, x, y, false, arena, 16, 16) { turretSprite = new Sprite(parent.GameRef.Resources.GetSpriteDescriptor("turret"), parent.GameRef.Resources); }
public void StartLevel(int level) { switch (level) { case 1: arena = new Arena(5000, 5000, gameref); /*foreach (Component obj in player.Components) { arena.AddObject(obj); }*/ break; } }
public PlayerShipBody(Ship parent, double x, double y, Arena arena) : base(parent, x, y, false, arena, 32, 48) { bodySprite = new Sprite(parent.GameRef.Resources.GetSpriteDescriptor("playership"), parent.GameRef.Resources); }