public override void OnEnter() { //Player.Flip = SpriteEffects.FlipHorizontally; StorePlayerData(); Player.Flip = SpriteEffects.FlipHorizontally; SetRoomData(); m_cutsceneRunning = true; SoundManager.StopMusic(0.5f); m_boss.AnimationDelay = 0.1f; m_boss.ChangeSprite("EnemyBlobBossAir_Character"); m_boss.PlayAnimation(); m_boss2.AnimationDelay = 0.1f; m_boss2.ChangeSprite("EnemyBlobBossAir_Character"); m_boss2.PlayAnimation(); Player.AttachedLevel.UpdateCamera(); m_startingCamPos = Player.AttachedLevel.Camera.Position; Player.LockControls(); Player.AttachedLevel.RunCinematicBorders(6f); Player.AttachedLevel.CameraLockedToPlayer = false; Player.AttachedLevel.Camera.Y = Player.Y; Tween.To(Player.AttachedLevel.Camera, 1f, Quad.EaseInOut, "Y", m_boss.Y.ToString(), "X", m_boss.X.ToString()); Tween.RunFunction(1.2f, this, "DisplayBossTitle", Game.PlayerStats.PlayerName + " VS", m_boss.Name, "Intro2"); base.OnEnter(); m_bossChest.ForcedItemType = 18; }
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 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; }