Exemplo n.º 1
0
 public override void Dispose()
 {
     if (!base.IsDisposed)
     {
         Console.WriteLine("Disposing Procedural Level Screen");
         Tween.StopAll(false);
         this.m_currentRoom = null;
         this.DisposeRTs();
         foreach (RoomObj current in this.m_roomList)
         {
             current.Dispose();
         }
         this.m_roomList.Clear();
         this.m_roomList = null;
         this.m_enemyStartPositions.Clear();
         this.m_enemyStartPositions = null;
         this.m_tempEnemyStartPositions.Clear();
         this.m_tempEnemyStartPositions = null;
         this.m_textManager.Dispose();
         this.m_textManager = null;
         this.m_physicsManager = null;
         this.m_projectileManager.Dispose();
         this.m_projectileManager = null;
         this.m_itemDropManager.Dispose();
         this.m_itemDropManager = null;
         this.m_currentRoom = null;
         this.m_miniMapDisplay.Dispose();
         this.m_miniMapDisplay = null;
         this.m_mapBG.Dispose();
         this.m_mapBG = null;
         this.m_inputMap.Dispose();
         this.m_inputMap = null;
         this.m_lastEnemyHit = null;
         this.m_playerHUD.Dispose();
         this.m_playerHUD = null;
         this.m_player = null;
         this.m_enemyHUD.Dispose();
         this.m_enemyHUD = null;
         this.m_impactEffectPool.Dispose();
         this.m_impactEffectPool = null;
         this.m_blackBorder1.Dispose();
         this.m_blackBorder1 = null;
         this.m_blackBorder2.Dispose();
         this.m_blackBorder2 = null;
         this.m_chestList.Clear();
         this.m_chestList = null;
         this.m_projectileIconPool.Dispose();
         this.m_projectileIconPool = null;
         this.m_objKilledPlayer = null;
         this.m_dungeonLight.Dispose();
         this.m_dungeonLight = null;
         this.m_traitAura.Dispose();
         this.m_traitAura = null;
         this.m_killedEnemyObjList.Clear();
         this.m_killedEnemyObjList = null;
         this.m_roomEnteringTitle.Dispose();
         this.m_roomEnteringTitle = null;
         this.m_roomTitle.Dispose();
         this.m_roomTitle = null;
         this.m_creditsText.Dispose();
         this.m_creditsText = null;
         this.m_creditsTitleText.Dispose();
         this.m_creditsTitleText = null;
         Array.Clear(this.m_creditsTextTitleList, 0, this.m_creditsTextTitleList.Length);
         Array.Clear(this.m_creditsTextList, 0, this.m_creditsTextList.Length);
         this.m_creditsTextTitleList = null;
         this.m_creditsTextList = null;
         this.m_filmGrain.Dispose();
         this.m_filmGrain = null;
         this.m_objectivePlate.Dispose();
         this.m_objectivePlate = null;
         this.m_objectivePlateTween = null;
         this.m_sky.Dispose();
         this.m_sky = null;
         this.m_whiteBG.Dispose();
         this.m_whiteBG = null;
         this.m_compassBG.Dispose();
         this.m_compassBG = null;
         this.m_compass.Dispose();
         this.m_compass = null;
         if (this.m_compassDoor != null)
         {
             this.m_compassDoor.Dispose();
         }
         this.m_compassDoor = null;
         this.m_castleBorderTexture.Dispose();
         this.m_gardenBorderTexture.Dispose();
         this.m_towerBorderTexture.Dispose();
         this.m_dungeonBorderTexture.Dispose();
         this.m_neoBorderTexture.Dispose();
         this.m_castleBorderTexture = null;
         this.m_gardenBorderTexture = null;
         this.m_towerBorderTexture = null;
         this.m_dungeonBorderTexture = null;
         this.DebugTextObj.Dispose();
         this.DebugTextObj = null;
         base.Dispose();
     }
 }
Exemplo n.º 2
0
 public override void LoadContent()
 {
     this.DebugTextObj = new TextObj(Game.JunicodeFont);
     this.DebugTextObj.FontSize = 26f;
     this.DebugTextObj.Align = Types.TextAlign.Centre;
     this.DebugTextObj.Text = "";
     this.DebugTextObj.ForceDraw = true;
     this.m_projectileIconPool = new ProjectileIconPool(200, this.m_projectileManager, base.ScreenManager as RCScreenManager);
     this.m_projectileIconPool.Initialize();
     this.m_textManager.Initialize();
     this.m_impactEffectPool.Initialize();
     this.m_physicsManager = (base.ScreenManager.Game as Game).PhysicsManager;
     this.m_physicsManager.SetGravity(0f, 1830f);
     this.m_projectileManager.Initialize();
     this.m_physicsManager.Initialize(base.ScreenManager.Camera);
     this.m_itemDropManager = new ItemDropManager(600, this.m_physicsManager);
     this.m_itemDropManager.Initialize();
     this.m_playerHUD = new PlayerHUDObj();
     this.m_playerHUD.SetPosition(new Vector2(20f, 40f));
     this.m_enemyHUD = new EnemyHUDObj();
     this.m_enemyHUD.Position = new Vector2((float)(660 - this.m_enemyHUD.Width / 2), 20f);
     this.m_miniMapDisplay.SetPlayer(this.m_player);
     this.m_miniMapDisplay.InitializeAlphaMap(new Rectangle(1070, 50, 200, 100), base.Camera);
     this.InitializeAllRooms(true);
     this.InitializeEnemies();
     this.InitializeChests(true);
     this.InitializeRenderTargets();
     this.m_mapBG = new SpriteObj("MinimapBG_Sprite");
     this.m_mapBG.Position = new Vector2(1070f, 50f);
     this.m_mapBG.ForceDraw = true;
     this.UpdateCamera();
     this.m_borderSize = 100;
     this.m_blackBorder1 = new SpriteObj("Blank_Sprite");
     this.m_blackBorder1.TextureColor = Color.Black;
     this.m_blackBorder1.Scale = new Vector2(1340f / (float)this.m_blackBorder1.Width, (float)(this.m_borderSize / this.m_blackBorder1.Height));
     this.m_blackBorder2 = new SpriteObj("Blank_Sprite");
     this.m_blackBorder2.TextureColor = Color.Black;
     this.m_blackBorder2.Scale = new Vector2(1340f / (float)this.m_blackBorder2.Width, (float)(this.m_borderSize / this.m_blackBorder2.Height));
     this.m_blackBorder1.ForceDraw = true;
     this.m_blackBorder2.ForceDraw = true;
     this.m_blackBorder1.Y = (float)(-(float)this.m_borderSize);
     this.m_blackBorder2.Y = 720f;
     this.m_dungeonLight = new SpriteObj("LightSource_Sprite");
     this.m_dungeonLight.ForceDraw = true;
     this.m_dungeonLight.Scale = new Vector2(12f, 12f);
     this.m_traitAura = new SpriteObj("LightSource_Sprite");
     this.m_traitAura.ForceDraw = true;
     this.m_objectivePlate = new ObjContainer("DialogBox_Character");
     this.m_objectivePlate.ForceDraw = true;
     TextObj textObj = new TextObj(Game.JunicodeFont);
     textObj.Position = new Vector2(-400f, -60f);
     textObj.OverrideParentScale = true;
     textObj.FontSize = 10f;
     textObj.Text = "Fairy Chest Objective:";
     textObj.TextureColor = Color.Red;
     textObj.OutlineWidth = 2;
     this.m_objectivePlate.AddChild(textObj);
     TextObj textObj2 = new TextObj(Game.JunicodeFont);
     textObj2.OverrideParentScale = true;
     textObj2.Position = new Vector2(textObj.X, textObj.Y + 40f);
     textObj2.ForceDraw = true;
     textObj2.FontSize = 9f;
     textObj2.Text = "Reach the chest in 15 seconds:";
     textObj2.WordWrap(250);
     textObj2.OutlineWidth = 2;
     this.m_objectivePlate.AddChild(textObj2);
     TextObj textObj3 = new TextObj(Game.JunicodeFont);
     textObj3.OverrideParentScale = true;
     textObj3.Position = new Vector2(textObj2.X, textObj2.Y + 35f);
     textObj3.ForceDraw = true;
     textObj3.FontSize = 9f;
     textObj3.Text = "Time Remaining:";
     textObj3.WordWrap(250);
     textObj3.OutlineWidth = 2;
     this.m_objectivePlate.AddChild(textObj3);
     this.m_objectivePlate.Scale = new Vector2(250f / (float)this.m_objectivePlate.GetChildAt(0).Width, 130f / (float)this.m_objectivePlate.GetChildAt(0).Height);
     this.m_objectivePlate.Position = new Vector2(1470f, 250f);
     SpriteObj spriteObj = new SpriteObj("Blank_Sprite");
     spriteObj.TextureColor = Color.Red;
     spriteObj.Position = new Vector2(textObj2.X, textObj2.Y + 20f);
     spriteObj.ForceDraw = true;
     spriteObj.OverrideParentScale = true;
     spriteObj.ScaleY = 0.5f;
     this.m_objectivePlate.AddChild(spriteObj);
     SpriteObj spriteObj2 = new SpriteObj("Blank_Sprite");
     spriteObj2.TextureColor = Color.Red;
     spriteObj2.Position = new Vector2(textObj2.X, spriteObj.Y + 35f);
     spriteObj2.ForceDraw = true;
     spriteObj2.OverrideParentScale = true;
     spriteObj2.ScaleY = 0.5f;
     this.m_objectivePlate.AddChild(spriteObj2);
     base.LoadContent();
     this.m_sky = new SkyObj(this);
     this.m_sky.LoadContent(base.Camera);
     this.m_whiteBG = new SpriteObj("Blank_Sprite");
     this.m_whiteBG.Opacity = 0f;
     this.m_whiteBG.Scale = new Vector2(1320f / (float)this.m_whiteBG.Width, 720f / (float)this.m_whiteBG.Height);
     this.m_filmGrain = new SpriteObj("FilmGrain_Sprite");
     this.m_filmGrain.ForceDraw = true;
     this.m_filmGrain.Scale = new Vector2(2.015f, 2.05f);
     this.m_filmGrain.X -= 5f;
     this.m_filmGrain.Y -= 5f;
     this.m_filmGrain.PlayAnimation(true);
     this.m_filmGrain.AnimationDelay = 0.0333333351f;
     this.m_compassBG = new SpriteObj("CompassBG_Sprite");
     this.m_compassBG.ForceDraw = true;
     this.m_compassBG.Position = new Vector2(660f, 90f);
     this.m_compassBG.Scale = Vector2.Zero;
     this.m_compass = new SpriteObj("Compass_Sprite");
     this.m_compass.Position = this.m_compassBG.Position;
     this.m_compass.ForceDraw = true;
     this.m_compass.Scale = Vector2.Zero;
     this.InitializeCreditsText();
 }