public override void Initialize() { base.Initialize(); SetHP(); freighter = new FreighterAlly(Game, spriteSheet, player, new Rectangle(Game1.ScreenSize.X / 2 - 100, (Game1.ScreenSize.Y - 600) / 2 + 425, 200, 50), "none", 200, HP, 300, 0, 4); freighter.Initialize(); freighter.PositionX = Game1.ScreenSize.X / 2; freighter.PositionY = (Game1.ScreenSize.Y - 600) / 2 + 450; freighter.CreateAI(AIBehaviour.NoWeapon); Game.stateManager.shooterState.gameObjects.Add(freighter); freighterHpBar = new Bar(Game, spriteSheet, Color.Red, true, new Rectangle(4, 53, 139, 7), new Rectangle(2, 374, 137, 5)); }
protected VerticalShooterShip RetrieveCreatureFromEnum(EnemyType identifier) { VerticalShooterShip creature = null; switch (identifier) { // Allies case EnemyType.allianceFighterAlly: { creature = new AllianceFighterAlly(Game, spriteSheet, player); break; } case EnemyType.freighterAlly: { creature = new FreighterAlly(Game, spriteSheet, player); break; } case EnemyType.rebelFighterAlly: { creature = new RebelFighterAlly(Game, spriteSheet, player); break; } // Neutral #region neutral case EnemyType.big_R: { creature = new AllianceBigFighterMkI(Game, spriteSheet, player); break; } case EnemyType.bigMissile_R: { creature = new AllianceBigMissileEnemy(Game, spriteSheet, player); break; } case EnemyType.turret: { creature = new Turret(Game, spriteSheet, player); break; } case EnemyType.meteor: { int rNbr = random.Next(4); switch (rNbr) { case 0: { creature = new Meteorite15(Game, spriteSheet, player); break; } case 1: { creature = new Meteorite20(Game, spriteSheet, player); break; } case 2: { creature = new Meteorite25(Game, spriteSheet, player); break; } case 3: { creature = new Meteorite30(Game, spriteSheet, player); break; } default: { throw new ArgumentException("Check the randomized range"); } } break; } case EnemyType.homingBullet_R: { creature = new AllianceHomingShotEnemy(Game, spriteSheet, player); break; } case EnemyType.homingMissile_R: { creature = new AllianceHomingMissileEnemy(Game, spriteSheet, player); break; } case EnemyType.medium: { creature = new RebelMediumSizedEnemy(Game, spriteSheet, player); break; } case EnemyType.smallShooter_R: { creature = new AllianceSmallShooter(Game, spriteSheet, player); break; } #endregion // Rebel #region rebel case EnemyType.R_mosquito: { creature = new RebelMosquito(Game, spriteSheet, player); break; } case EnemyType.R_thickShooter: { creature = new RebelThickShooter(Game, spriteSheet, player); break; } case EnemyType.R_smallSniper: { creature = new RebelSmallSniper(Game, spriteSheet, player); break; } case EnemyType.R_lightMinelayer: { creature = new RebelLightMinelayer(Game, spriteSheet, player); break; } case EnemyType.R_homingMissile: { creature = new RebelHomingMissile(Game, spriteSheet, player); break; } case EnemyType.R_bomber: { creature = new RebelBomber(Game, spriteSheet, player); break; } case EnemyType.R_burster: { creature = new RebelBurster(Game, spriteSheet, player); break; } case EnemyType.R_minelayer: { creature = new RebelMinelayer(Game, spriteSheet, player); break; } case EnemyType.R_smallAttack: { creature = new RebelSmallAttackShip(Game, spriteSheet, player); break; } case EnemyType.R_missileAttackShip: { creature = new RebelMissileAttack(Game, spriteSheet, player); break; } case EnemyType.R_fatzo: { creature = new RebelFatzo(Game, spriteSheet, player); break; } #endregion // Alliance #region alliance case EnemyType.A_drone: { creature = new AllianceDrone(Game, spriteSheet, player); break; } case EnemyType.A_smallLaserShip: { creature = new AllianceSmallLaserShip(Game, spriteSheet, player); break; } case EnemyType.A_singleHoming: { creature = new AllianceSingleHoming(Game, spriteSheet, player); break; } case EnemyType.A_shielder: { creature = new AllianceShielder(Game, spriteSheet, player); break; } case EnemyType.A_attackStealth: { creature = new AllianceStealthAttackShip(Game, spriteSheet, player); break; } case EnemyType.A_lightBeamer: { creature = new AllianceLightBeamer(Game, spriteSheet, player); break; } case EnemyType.A_multipleShot: { creature = new AllianceMultipleShot(Game, spriteSheet, player); break; } case EnemyType.A_stealthShip: { creature = new AllianceStealthShip(Game, spriteSheet, player); break; } case EnemyType.A_heavyBeamer: { creature = new AllianceHeavyBeamer(Game, spriteSheet, player); break; } case EnemyType.A_ballistic: { creature = new AllianceBallistic(Game, spriteSheet, player); break; } case EnemyType.A_hangar: { creature = new AllianceHangar(Game, spriteSheet, player); break; } #endregion default: { throw new ArgumentException("Argument not implemented!"); } } return(creature); }