Exemplo n.º 1
0
 public override List <MobileEntity> SetFormation(string entityType, int numEntity = 1)
 {
     return(new List <MobileEntity>()
     {
         MobMaker.CreateMob(entityType, StartingPosition)
     });
 }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
 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;
 }
Exemplo n.º 4
0
        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);
        }
Exemplo n.º 5
0
        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);
        }
Exemplo n.º 6
0
 public Arrowhead(MobMaker mobMaker, Vector2 startingPosition) : base(mobMaker, startingPosition)
 {
 }
Exemplo n.º 7
0
 public ArcFormation(MobMaker mobMaker, Vector2 startingPosition) : base(mobMaker, startingPosition)
 {
 }
Exemplo n.º 8
0
 public Solo(MobMaker mobMaker, Vector2 startingPosition) : base(mobMaker, startingPosition)
 {
 }
Exemplo n.º 9
0
 public Formation(MobMaker mobMaker, Vector2 startingPosition)
 {
     this.MobMaker         = mobMaker;
     this.StartingPosition = startingPosition;
 }