public override List <MobileEntity> SetFormation(string entityType, int numEntity = 1) { return(new List <MobileEntity>() { MobMaker.CreateMob(entityType, StartingPosition) }); }
public override List <MobileEntity> SetFormation(string entityType, int numBullets) { Vector2 shift = new Vector2(0, 0); List <MobileEntity> arc = new List <MobileEntity>(); while (numBullets % 2 == 1 || numBullets < 4) { numBullets++; } for (int i = 0; i < numBullets; i++) { arc.Add(MobMaker.CreateMob(entityType, StartingPosition + shift)); arc[i].Active = true; if (i < (numBullets / 2) - 1) { shift += new Vector2(Constants.BULLET_SPACING * 2, Constants.BULLET_SPACING * 2); } else if (i == (numBullets / 2) - 1) { shift += new Vector2(Constants.BULLET_SPACING * 2, 0); } else { shift += new Vector2(Constants.BULLET_SPACING * 2, -Constants.BULLET_SPACING * 2); } } return(arc); }
public MoveScript(List <MobileEntity> mobs, bool willFire) { this.Mobs = mobs ?? throw new ArgumentNullException(nameof(mobs)); this.Bullets = new List <MoveScript>(); this.willFire = willFire; this.FrameCount = 0; this.MobMaker = new BulletMaker(); this.Active = true; }
public override List <MobileEntity> SetFormation(string entityType, int numBullets = 3) { List <MobileEntity> Zig = new List <MobileEntity>(); Zig.Add(MobMaker.CreateMob(entityType, StartingPosition)); Zig.Add(MobMaker.CreateMob(entityType, StartingPosition)); Zig.Add(MobMaker.CreateMob(entityType, StartingPosition)); Zig[0].Active = true; Zig[1].Active = true; Zig[2].Active = true; return(Zig); }
public override List <MobileEntity> SetFormation(string entityType, int numBullet = 10) { List <MobileEntity> Entities = new List <MobileEntity>(); Vector2 shift = new Vector2(-Constants.BULLET_SPACING * 2, 0); Entities.Add(MobMaker.CreateMob(entityType, StartingPosition)); Entities.Add(MobMaker.CreateMob(entityType, StartingPosition + shift)); shift = new Vector2(Constants.BULLET_SPACING * 2, 0); Entities.Add(MobMaker.CreateMob(entityType, StartingPosition + shift)); shift = new Vector2(Constants.BULLET_SPACING, Constants.BULLET_SPACING); Entities.Add(MobMaker.CreateMob(entityType, StartingPosition + shift)); shift = new Vector2(-Constants.BULLET_SPACING, Constants.BULLET_SPACING); Entities.Add(MobMaker.CreateMob(entityType, StartingPosition + shift)); shift = new Vector2(0, Constants.BULLET_SPACING * 2); Entities.Add(MobMaker.CreateMob(entityType, StartingPosition + shift)); foreach (MobileEntity entity in Entities) { entity.Active = true; } return(Entities); }
public Arrowhead(MobMaker mobMaker, Vector2 startingPosition) : base(mobMaker, startingPosition) { }
public ArcFormation(MobMaker mobMaker, Vector2 startingPosition) : base(mobMaker, startingPosition) { }
public Solo(MobMaker mobMaker, Vector2 startingPosition) : base(mobMaker, startingPosition) { }
public Formation(MobMaker mobMaker, Vector2 startingPosition) { this.MobMaker = mobMaker; this.StartingPosition = startingPosition; }