public override void Initialize() { m_boss = (EnemyList[0] as EnemyObj_Blob); m_boss.SaveToFile = false; m_boss2 = (EnemyList[1] as EnemyObj_Blob); m_boss2.SaveToFile = false; base.Initialize(); }
public override void Dispose() { if (!base.IsDisposed) { this.m_boss = null; this.m_boss2 = null; base.Dispose(); } }
public override void Dispose() { if (!IsDisposed) { m_boss = null; m_boss2 = null; base.Dispose(); } }
public override void Dispose() { if (!IsDisposed) { m_blobArray.Clear(); m_blobArray = null; m_boss1 = null; base.Dispose(); } }
public override void Dispose() { if (!base.IsDisposed) { this.m_blobArray.Clear(); this.m_blobArray = null; this.m_boss1 = null; base.Dispose(); } }
public override void Initialize() { m_boss1 = (EnemyList[0] as EnemyObj_Blob); m_boss1.PauseEnemy(true); m_boss1.DisableAllWeight = false; m_desiredBossScale = m_boss1.Scale.X; m_blobArray = new List <ObjContainer>(); for (var i = 0; i < m_numIntroBlobs; i++) { var objContainer = new ObjContainer("EnemyBlobBossAir_Character"); objContainer.Position = m_boss1.Position; objContainer.Scale = new Vector2(0.4f, 0.4f); objContainer.GetChildAt(0).TextureColor = Color.White; objContainer.GetChildAt(2).TextureColor = Color.LightSkyBlue; objContainer.GetChildAt(2).Opacity = 0.8f; (objContainer.GetChildAt(1) as SpriteObj).OutlineColour = Color.Black; objContainer.Y -= 1000f; m_blobArray.Add(objContainer); GameObjList.Add(objContainer); } base.Initialize(); }
private void FixMiniboss(EnemyObj enemy) { byte type = enemy.Type; switch (type) { case 2: this.m_blobBoss = (enemy as EnemyObj_Blob); enemy.ChangeSprite("EnemyBlobBossIdle_Character"); enemy.GetChildAt(0).TextureColor = Color.White; enemy.GetChildAt(2).TextureColor = Color.LightSkyBlue; enemy.GetChildAt(2).Opacity = 0.8f; (enemy.GetChildAt(1) as SpriteObj).OutlineColour = Color.Black; enemy.GetChildAt(1).TextureColor = Color.Black; break; case 3: case 4: break; case 5: if (enemy.Flip == SpriteEffects.None) { enemy.Name = "Amon"; } else { enemy.Name = "Barbatos"; } break; case 6: enemy.ChangeSprite("EnemyEyeballBossEye_Character"); (enemy as EnemyObj_Eyeball).ChangeToBossPupil(); break; case 7: enemy.ChangeSprite("EnemyFairyGhostBossIdle_Character"); break; case 8: enemy.ChangeSprite("EnemyGhostBossIdle_Character"); break; default: if (type != 15) { if (type == 22) { if (enemy.Flip == SpriteEffects.None) { enemy.Name = "Stolas"; } else { enemy.Name = "Focalor"; } } } else if (enemy.Flip == SpriteEffects.None) { enemy.Name = "Berith"; } else { enemy.Name = "Halphas"; } break; } enemy.PlayAnimation(true); }
private void CreateBlob(GameTypes.EnemyDifficulty difficulty, int numHits, bool isNeo = false) { EnemyObj_Blob enemyObj_Blob = new EnemyObj_Blob(null, null, null, difficulty); enemyObj_Blob.InitializeEV(); enemyObj_Blob.Position = base.Position; if (this.m_target.X < enemyObj_Blob.X) { enemyObj_Blob.Orientation = MathHelper.ToRadians(0f); } else { enemyObj_Blob.Orientation = MathHelper.ToRadians(180f); } enemyObj_Blob.Level = base.Level; this.m_levelScreen.AddEnemyToCurrentRoom(enemyObj_Blob); enemyObj_Blob.Scale = new Vector2(this.ScaleX * this.BlobSizeChange.X, this.ScaleY * this.BlobSizeChange.Y); enemyObj_Blob.SetNumberOfHits(numHits); enemyObj_Blob.Speed *= this.BlobSpeedChange; enemyObj_Blob.MainBlob = false; enemyObj_Blob.SavedStartingPos = enemyObj_Blob.Position; enemyObj_Blob.IsNeo = isNeo; if (isNeo) { enemyObj_Blob.Name = base.Name; enemyObj_Blob.IsWeighted = false; enemyObj_Blob.TurnSpeed = this.TurnSpeed; enemyObj_Blob.Speed = base.Speed * this.BlobSpeedChange; enemyObj_Blob.Level = base.Level; enemyObj_Blob.MaxHealth = this.MaxHealth; enemyObj_Blob.CurrentHealth = enemyObj_Blob.MaxHealth; enemyObj_Blob.Damage = base.Damage; enemyObj_Blob.ChangeNeoStats(this.BlobSizeChange.X, this.BlobSpeedChange, numHits); } int num = CDGMath.RandomInt(-500, -300); int num2 = CDGMath.RandomInt(300, 700); if (enemyObj_Blob.X < this.m_target.X) { enemyObj_Blob.AccelerationX += -(this.m_target.EnemyKnockBack.X + (float)num); } else { enemyObj_Blob.AccelerationX += this.m_target.EnemyKnockBack.X + (float)num; } enemyObj_Blob.AccelerationY += -(this.m_target.EnemyKnockBack.Y + (float)num2); if (enemyObj_Blob.Difficulty == GameTypes.EnemyDifficulty.MINIBOSS) { for (int i = 0; i < base.NumChildren; i++) { enemyObj_Blob.GetChildAt(i).Opacity = base.GetChildAt(i).Opacity; enemyObj_Blob.GetChildAt(i).TextureColor = base.GetChildAt(i).TextureColor; } enemyObj_Blob.ChangeSprite("EnemyBlobBossAir_Character"); } else { enemyObj_Blob.ChangeSprite("EnemyBlobAir_Character"); } enemyObj_Blob.PlayAnimation(true); if (LevelEV.SHOW_ENEMY_RADII) { enemyObj_Blob.InitializeDebugRadii(); } enemyObj_Blob.SaveToFile = false; enemyObj_Blob.SpawnRoom = this.m_levelScreen.CurrentRoom; enemyObj_Blob.GivesLichHealth = false; }
private void FixMiniboss(EnemyObj enemy) { var type = enemy.Type; switch (type) { case 2: m_blobBoss = (enemy as EnemyObj_Blob); enemy.ChangeSprite("EnemyBlobBossIdle_Character"); enemy.GetChildAt(0).TextureColor = Color.White; enemy.GetChildAt(2).TextureColor = Color.LightSkyBlue; enemy.GetChildAt(2).Opacity = 0.8f; (enemy.GetChildAt(1) as SpriteObj).OutlineColour = Color.Black; enemy.GetChildAt(1).TextureColor = Color.Black; break; case 3: case 4: break; case 5: if (enemy.Flip == SpriteEffects.None) { enemy.Name = "Amon"; } else { enemy.Name = "Barbatos"; } break; case 6: enemy.ChangeSprite("EnemyEyeballBossEye_Character"); (enemy as EnemyObj_Eyeball).ChangeToBossPupil(); break; case 7: enemy.ChangeSprite("EnemyFairyGhostBossIdle_Character"); break; case 8: enemy.ChangeSprite("EnemyGhostBossIdle_Character"); break; default: if (type != 15) { if (type == 22) { if (enemy.Flip == SpriteEffects.None) { enemy.Name = "Stolas"; } else { enemy.Name = "Focalor"; } } } else if (enemy.Flip == SpriteEffects.None) { enemy.Name = "Berith"; } else { enemy.Name = "Halphas"; } break; } enemy.PlayAnimation(); }
public static EnemyObj BuildEnemy(int enemyType, PlayerObj player, PhysicsManager physicsManager, ProceduralLevelScreen levelToAttachTo, GameTypes.EnemyDifficulty difficulty, bool doNotInitialize = false) { EnemyObj enemyObj = null; switch (enemyType) { case 1: enemyObj = new EnemyObj_BallAndChain(player, physicsManager, levelToAttachTo, difficulty); break; case 2: enemyObj = new EnemyObj_Blob(player, physicsManager, levelToAttachTo, difficulty); break; case 3: enemyObj = new EnemyObj_BouncySpike(player, physicsManager, levelToAttachTo, difficulty); break; case 4: enemyObj = new EnemyObj_Eagle(player, physicsManager, levelToAttachTo, difficulty); break; case 5: enemyObj = new EnemyObj_EarthWizard(player, physicsManager, levelToAttachTo, difficulty); break; case 6: enemyObj = new EnemyObj_Eyeball(player, physicsManager, levelToAttachTo, difficulty); break; case 7: enemyObj = new EnemyObj_Fairy(player, physicsManager, levelToAttachTo, difficulty); break; case 8: enemyObj = new EnemyObj_Fireball(player, physicsManager, levelToAttachTo, difficulty); break; case 9: enemyObj = new EnemyObj_FireWizard(player, physicsManager, levelToAttachTo, difficulty); break; case 10: enemyObj = new EnemyObj_Horse(player, physicsManager, levelToAttachTo, difficulty); break; case 11: enemyObj = new EnemyObj_IceWizard(player, physicsManager, levelToAttachTo, difficulty); break; case 12: enemyObj = new EnemyObj_Knight(player, physicsManager, levelToAttachTo, difficulty); break; case 13: enemyObj = new EnemyObj_Ninja(player, physicsManager, levelToAttachTo, difficulty); break; case 14: enemyObj = new EnemyObj_ShieldKnight(player, physicsManager, levelToAttachTo, difficulty); break; case 15: enemyObj = new EnemyObj_Skeleton(player, physicsManager, levelToAttachTo, difficulty); break; case 16: enemyObj = new EnemyObj_SwordKnight(player, physicsManager, levelToAttachTo, difficulty); break; case 17: enemyObj = new EnemyObj_Turret(player, physicsManager, levelToAttachTo, difficulty); break; case 18: enemyObj = new EnemyObj_Wall(player, physicsManager, levelToAttachTo, difficulty); break; case 19: enemyObj = new EnemyObj_Wolf(player, physicsManager, levelToAttachTo, difficulty); break; case 20: enemyObj = new EnemyObj_Zombie(player, physicsManager, levelToAttachTo, difficulty); break; case 21: enemyObj = new EnemyObj_SpikeTrap(player, physicsManager, levelToAttachTo, difficulty); break; case 22: enemyObj = new EnemyObj_Plant(player, physicsManager, levelToAttachTo, difficulty); break; case 23: enemyObj = new EnemyObj_Energon(player, physicsManager, levelToAttachTo, difficulty); break; case 24: enemyObj = new EnemyObj_Spark(player, physicsManager, levelToAttachTo, difficulty); break; case 25: enemyObj = new EnemyObj_SkeletonArcher(player, physicsManager, levelToAttachTo, difficulty); break; case 26: enemyObj = new EnemyObj_Chicken(player, physicsManager, levelToAttachTo, difficulty); break; case 27: enemyObj = new EnemyObj_Platform(player, physicsManager, levelToAttachTo, difficulty); break; case 28: enemyObj = new EnemyObj_HomingTurret(player, physicsManager, levelToAttachTo, difficulty); break; case 29: enemyObj = new EnemyObj_LastBoss(player, physicsManager, levelToAttachTo, difficulty); break; case 30: enemyObj = new EnemyObj_Dummy(player, physicsManager, levelToAttachTo, difficulty); break; case 31: enemyObj = new EnemyObj_Starburst(player, physicsManager, levelToAttachTo, difficulty); break; case 32: enemyObj = new EnemyObj_Portrait(player, physicsManager, levelToAttachTo, difficulty); break; case 33: enemyObj = new EnemyObj_Mimic(player, physicsManager, levelToAttachTo, difficulty); break; } if (player == null && !doNotInitialize) { enemyObj.Initialize(); } return(enemyObj); }
public override void Initialize() { this.m_boss = (base.EnemyList[0] as EnemyObj_Blob); this.m_boss.SaveToFile = false; this.m_boss2 = (base.EnemyList[1] as EnemyObj_Blob); this.m_boss2.SaveToFile = false; base.Initialize(); }
public static EnemyObj BuildEnemy(int enemyType, PlayerObj player, PhysicsManager physicsManager, ProceduralLevelScreen levelToAttachTo, GameTypes.EnemyDifficulty difficulty, bool doNotInitialize = false) { EnemyObj enemyObj = null; switch (enemyType) { case 1: enemyObj = new EnemyObj_BallAndChain(player, physicsManager, levelToAttachTo, difficulty); break; case 2: enemyObj = new EnemyObj_Blob(player, physicsManager, levelToAttachTo, difficulty); break; case 3: enemyObj = new EnemyObj_BouncySpike(player, physicsManager, levelToAttachTo, difficulty); break; case 4: enemyObj = new EnemyObj_Eagle(player, physicsManager, levelToAttachTo, difficulty); break; case 5: enemyObj = new EnemyObj_EarthWizard(player, physicsManager, levelToAttachTo, difficulty); break; case 6: enemyObj = new EnemyObj_Eyeball(player, physicsManager, levelToAttachTo, difficulty); break; case 7: enemyObj = new EnemyObj_Fairy(player, physicsManager, levelToAttachTo, difficulty); break; case 8: enemyObj = new EnemyObj_Fireball(player, physicsManager, levelToAttachTo, difficulty); break; case 9: enemyObj = new EnemyObj_FireWizard(player, physicsManager, levelToAttachTo, difficulty); break; case 10: enemyObj = new EnemyObj_Horse(player, physicsManager, levelToAttachTo, difficulty); break; case 11: enemyObj = new EnemyObj_IceWizard(player, physicsManager, levelToAttachTo, difficulty); break; case 12: enemyObj = new EnemyObj_Knight(player, physicsManager, levelToAttachTo, difficulty); break; case 13: enemyObj = new EnemyObj_Ninja(player, physicsManager, levelToAttachTo, difficulty); break; case 14: enemyObj = new EnemyObj_ShieldKnight(player, physicsManager, levelToAttachTo, difficulty); break; case 15: enemyObj = new EnemyObj_Skeleton(player, physicsManager, levelToAttachTo, difficulty); break; case 16: enemyObj = new EnemyObj_SwordKnight(player, physicsManager, levelToAttachTo, difficulty); break; case 17: enemyObj = new EnemyObj_Turret(player, physicsManager, levelToAttachTo, difficulty); break; case 18: enemyObj = new EnemyObj_Wall(player, physicsManager, levelToAttachTo, difficulty); break; case 19: enemyObj = new EnemyObj_Wolf(player, physicsManager, levelToAttachTo, difficulty); break; case 20: enemyObj = new EnemyObj_Zombie(player, physicsManager, levelToAttachTo, difficulty); break; case 21: enemyObj = new EnemyObj_SpikeTrap(player, physicsManager, levelToAttachTo, difficulty); break; case 22: enemyObj = new EnemyObj_Plant(player, physicsManager, levelToAttachTo, difficulty); break; case 23: enemyObj = new EnemyObj_Energon(player, physicsManager, levelToAttachTo, difficulty); break; case 24: enemyObj = new EnemyObj_Spark(player, physicsManager, levelToAttachTo, difficulty); break; case 25: enemyObj = new EnemyObj_SkeletonArcher(player, physicsManager, levelToAttachTo, difficulty); break; case 26: enemyObj = new EnemyObj_Chicken(player, physicsManager, levelToAttachTo, difficulty); break; case 27: enemyObj = new EnemyObj_Platform(player, physicsManager, levelToAttachTo, difficulty); break; case 28: enemyObj = new EnemyObj_HomingTurret(player, physicsManager, levelToAttachTo, difficulty); break; case 29: enemyObj = new EnemyObj_LastBoss(player, physicsManager, levelToAttachTo, difficulty); break; case 30: enemyObj = new EnemyObj_Dummy(player, physicsManager, levelToAttachTo, difficulty); break; case 31: enemyObj = new EnemyObj_Starburst(player, physicsManager, levelToAttachTo, difficulty); break; case 32: enemyObj = new EnemyObj_Portrait(player, physicsManager, levelToAttachTo, difficulty); break; case 33: enemyObj = new EnemyObj_Mimic(player, physicsManager, levelToAttachTo, difficulty); break; } if (player == null && !doNotInitialize) { enemyObj.Initialize(); } return enemyObj; }
private void CreateBlob(GameTypes.EnemyDifficulty difficulty, int numHits, bool isNeo = false) { var enemyObj_Blob = new EnemyObj_Blob(null, null, null, difficulty); enemyObj_Blob.InitializeEV(); enemyObj_Blob.Position = Position; if (m_target.X < enemyObj_Blob.X) { enemyObj_Blob.Orientation = MathHelper.ToRadians(0f); } else { enemyObj_Blob.Orientation = MathHelper.ToRadians(180f); } enemyObj_Blob.Level = Level; m_levelScreen.AddEnemyToCurrentRoom(enemyObj_Blob); enemyObj_Blob.Scale = new Vector2(ScaleX * BlobSizeChange.X, ScaleY * BlobSizeChange.Y); enemyObj_Blob.SetNumberOfHits(numHits); enemyObj_Blob.Speed *= BlobSpeedChange; enemyObj_Blob.MainBlob = false; enemyObj_Blob.SavedStartingPos = enemyObj_Blob.Position; enemyObj_Blob.IsNeo = isNeo; if (isNeo) { enemyObj_Blob.Name = Name; enemyObj_Blob.IsWeighted = false; enemyObj_Blob.TurnSpeed = TurnSpeed; enemyObj_Blob.Speed = Speed * BlobSpeedChange; enemyObj_Blob.Level = Level; enemyObj_Blob.MaxHealth = MaxHealth; enemyObj_Blob.CurrentHealth = enemyObj_Blob.MaxHealth; enemyObj_Blob.Damage = Damage; enemyObj_Blob.ChangeNeoStats(BlobSizeChange.X, BlobSpeedChange, numHits); } var num = CDGMath.RandomInt(-500, -300); var num2 = CDGMath.RandomInt(300, 700); if (enemyObj_Blob.X < m_target.X) { enemyObj_Blob.AccelerationX += -(m_target.EnemyKnockBack.X + num); } else { enemyObj_Blob.AccelerationX += m_target.EnemyKnockBack.X + num; } enemyObj_Blob.AccelerationY += -(m_target.EnemyKnockBack.Y + num2); if (enemyObj_Blob.Difficulty == GameTypes.EnemyDifficulty.MINIBOSS) { for (var i = 0; i < NumChildren; i++) { enemyObj_Blob.GetChildAt(i).Opacity = GetChildAt(i).Opacity; enemyObj_Blob.GetChildAt(i).TextureColor = GetChildAt(i).TextureColor; } enemyObj_Blob.ChangeSprite("EnemyBlobBossAir_Character"); } else { enemyObj_Blob.ChangeSprite("EnemyBlobAir_Character"); } enemyObj_Blob.PlayAnimation(); if (LevelEV.SHOW_ENEMY_RADII) { enemyObj_Blob.InitializeDebugRadii(); } enemyObj_Blob.SaveToFile = false; enemyObj_Blob.SpawnRoom = m_levelScreen.CurrentRoom; enemyObj_Blob.GivesLichHealth = false; }
public override void Initialize() { this.m_boss1 = (base.EnemyList[0] as EnemyObj_Blob); this.m_boss1.PauseEnemy(true); this.m_boss1.DisableAllWeight = false; this.m_desiredBossScale = this.m_boss1.Scale.X; this.m_blobArray = new List<ObjContainer>(); for (int i = 0; i < this.m_numIntroBlobs; i++) { ObjContainer objContainer = new ObjContainer("EnemyBlobBossAir_Character"); objContainer.Position = this.m_boss1.Position; objContainer.Scale = new Vector2(0.4f, 0.4f); objContainer.GetChildAt(0).TextureColor = Color.White; objContainer.GetChildAt(2).TextureColor = Color.LightSkyBlue; objContainer.GetChildAt(2).Opacity = 0.8f; (objContainer.GetChildAt(1) as SpriteObj).OutlineColour = Color.Black; objContainer.Y -= 1000f; this.m_blobArray.Add(objContainer); base.GameObjList.Add(objContainer); } base.Initialize(); }