/// <summary> /// Creates a new RightGun /// </summary> /// <param name="content">A ContentManager to load resources with</param> /// <param name="position">The blimp the RightGun is attached to</param> public RightGun(uint id, ContentManager content, Blimp ship) : base(id) { this.position.X = ship.Position.X + 69; this.position.Y = ship.Position.Y + 36; spritesheet = content.Load <Texture2D>("Spritesheets/newshi.shp.000000"); spriteBounds = new Rectangle(84, 47, 13, 63); this.Health = 100; this.gunTimer = 0; this.ship = ship; }
public Boss CreateBoss(BossType enemyType, Vector2 position) { Boss boss; uint id = NextID(); switch (enemyType) { case BossType.Blimp: boss = new Blimp(id, position, content); QueueGameObjectForCreation(new LeftGun(NextID(), content, boss as Blimp)); QueueGameObjectForCreation(new RightGun(NextID(), content, boss as Blimp)); break; case BossType.TwinJetManager: boss = new TwinJetManager(id, content, position); break; default: throw new NotImplementedException("The boss type " + Enum.GetName(typeof(BossType), enemyType) + " is not supported"); } boss.ObjectType = ObjectType.Boss; QueueGameObjectForCreation(boss); return(boss); }
public Boss CreateBoss(BossType enemyType, Vector2 position) { Boss boss; uint id = NextID(); switch (enemyType) { case BossType.Blimp: boss = new Blimp(id, position, content); QueueGameObjectForCreation(new LeftGun(NextID(), content, boss as Blimp)); QueueGameObjectForCreation(new RightGun(NextID(), content, boss as Blimp)); break; case BossType.TwinJetManager: boss = new TwinJetManager(id, content, position); break; case BossType.Bird: boss = new Bird(id, content, position); break; default: throw new NotImplementedException("The boss type " + Enum.GetName(typeof(BossType), enemyType) + " is not supported"); } boss.ObjectType = ObjectType.Boss; QueueGameObjectForCreation(boss); return boss; }
public Boss CreateBoss(BossType enemyType, Vector2 position) { Boss boss; uint id = NextID(); switch (enemyType) { case BossType.Blimp: Blimp blimp = new Blimp(id, position, content); LeftGun leftGun = new LeftGun(NextID(), content, blimp); RightGun rightGun = new RightGun(NextID(), content, blimp); leftGun.ObjectType = ObjectType.Boss; rightGun.ObjectType = ObjectType.Boss; blimp.leftGun = leftGun; blimp.rightGun = rightGun; QueueGameObjectForCreation(leftGun); QueueGameObjectForCreation(rightGun); boss = blimp; break; case BossType.TwinJetManager: boss = new TwinJetManager(id, content, position); break; case BossType.MoonBoss: boss = new MoonBoss(id, content, position); break; case BossType.Lavabug: boss = new Lavabug(id, content, position); break; case BossType.BrainBoss: boss = new BrainBossWrapper(id, content, position); break; case BossType.Bird: boss = new Bird(id, content, position); break; default: throw new NotImplementedException("The boss type " + Enum.GetName(typeof(BossType), enemyType) + " is not supported"); } boss.ObjectType = ObjectType.Boss; QueueGameObjectForCreation(boss); return boss; }
/// <summary> /// Creates a new RightGun /// </summary> /// <param name="content">A ContentManager to load resources with</param> /// <param name="position">The blimp the RightGun is attached to</param> public RightGun(uint id, ContentManager content, Blimp ship) : base(id) { this.position.X = ship.Position.X + 69; this.position.Y = ship.Position.Y + 36; spritesheet = content.Load<Texture2D>("Spritesheets/newshi.shp.000000"); spriteBounds = new Rectangle(84, 47, 13, 63); this.Health = 100; this.gunTimer = 0; this.ship = ship; }