public void PopUpWarning() { WindowPopUp window = (WindowPopUp)EditorWindow.GetWindow(typeof(WindowPopUp), false, "Pop-Up"); Rect pos = window.position; pos.center = new Rect(0f, 0f, Screen.currentResolution.width, Screen.currentResolution.height).center; window.position = pos; window.md5sum = this; window.ShowPopup(); }
// Animation spikeBallAnimation; public override void Initialize(Game1 game) { base.Initialize(game); MusicBGPlayer.Start(MenuSongAssestLoader.BattleSongOminous); MusicBGPlayer.Repeat(); BasicTeamUtility.Initialize(); game.IsMouseVisible = false; base.bIsInitialized = true; backGroundTexture = game.Content.Load <Texture2D>(backGroundString); popUpTexture = game.Content.Load <Texture2D>(popUpString); popUpFont = game.Content.Load <SpriteFont>(popUpFontString); pauseFont = game.Content.Load <SpriteFont>(@"Fonts\PauseFont"); selectionIndicatorTexture = game.Content.Load <Texture2D>(selectionIndicatorString); complexSpriteTexture = game.Content.Load <Texture2D>(complexSpriteString); hitBoxHelp = game.Content.Load <Texture2D>(hitBoxHelpString); testTexture = game.Content.Load <Texture2D>(testTextureString); arrowTexture = game.Content.Load <Texture2D>(arrowString); coneTexture = game.Content.Load <Texture2D>(coneString); tempCharTexture = game.Content.Load <Texture2D>(tempCharString); //MapBorderINitialization for (int i = -1; i < ((SceneUtility.currentMapSize.X / 64) + 2); i++) { borderTilesBounds.Add(new Rectangle(i * 64, -64, 64, 64)); borderTilesBounds.Add(new Rectangle(i * 64, (int)SceneUtility.currentMapSize.Y + 64, 64, 64)); } for (int i = 0; i < ((SceneUtility.currentMapSize.Y / 64) + 1); i++) { borderTilesBounds.Add(new Rectangle(-64, i * 64, 64, 64)); borderTilesBounds.Add(new Rectangle((int)SceneUtility.currentMapSize.Y + 64, i * 64, 64, 64)); } /* * spikeBallTexture = game.Content.Load<Texture2D>(spikeBallString); * List<Rectangle> tempList = new List<Rectangle>(); * tempList.Add((new Rectangle(0, 0, 64, 64))); * tempList.Add(new Rectangle(0, 64, 64, 64)); * List<int> tempListFC = new List<int>() { 16, 16, 0, 0, 0 }; * //spikeBallAnimation = new Animation(tempList,tempListFC,spikeBallTexture); * * test = new Shape(spikeBallTexture, 1, new Vector2(500, 500), true, default(Vector2), "Spiked ball", new Rectangle(0, 0, 64, 64)); * test.InitializeAnimation(tempList, tempListFC, spikeBallTexture, 600 / 16); * test.bPlayAnimation = true; * test.DynamicHitBoxes(); * shapes.Add(test); * * test = new Shape(spikeBallTexture, 1, new Vector2(500, 400), true, default(Vector2), "Spiked ball", new Rectangle(0, 0, 64, 64)); * test.InitializeAnimation(tempList, tempListFC, spikeBallTexture, 600 / 16); * test.bPlayAnimation = true; * // test.DynamicHitBoxes(); * shapes.Add(test); * * test = new Shape(spikeBallTexture, 1, new Vector2(600, 500), true, default(Vector2), "Spiked ball", new Rectangle(0, 0, 64, 64)); * test.InitializeAnimation(tempList, tempListFC, spikeBallTexture, 600 / 16); * test.bPlayAnimation = true; * test.animationIndex = 1; * test.DynamicHitBoxes(); * shapes.Add(test); * * test = new Shape(spikeBallTexture, 1, new Vector2(600, 400), true, default(Vector2), "Spiked ball", new Rectangle(0, 0, 64, 64)); * test.InitializeAnimation(tempList, tempListFC, spikeBallTexture, 600 / 16); * test.bPlayAnimation = true; * test.animationIndex = 1; * //test.shapeAnimation.currentAnimation = 1; * shapes.Add(test); */ ScreenButton[] popUpButtons = { new ScreenButton(null, popUpFont, "Options", new Vector2(283 + 50, 279 + 50)), new ScreenButton(null, popUpFont, "Exit Game", new Vector2(283 + 550, 279 + 50)) }; pauseScreen = new WindowPopUp(new Rectangle(0, 0, popUpTexture.Width, popUpTexture.Height), popUpTexture, popUpButtons); //^************************************* heroes.Add(new BasicHero((CharacterAssetsLoader.heroAssetsC1[(int)CharacterAssetsLoader.heroesC1.hero1]), 1, new Vector2(100, 50), true)); heroes[heroes.Count - 1].rectangleToDraw = CharacterAssetsLoader.heroAssetsC1[(int)CharacterAssetsLoader.heroesC1.hero1].shapeTextureBounds; BasicTeamUtility.parties[(int)BasicTeamUtility.FriendlyParties.Party].Add(heroes[heroes.Count - 1]); heroes[heroes.Count - 1].stats.baseStats[(int)BasicStatChart.stats.MaxHealth] = 150; heroes[heroes.Count - 1].stats.baseStats[(int)BasicStatChart.stats.Health] = 150; heroes[heroes.Count - 1].stats.baseStats[(int)BasicStatChart.stats.MaxMana] = 60; heroes[heroes.Count - 1].stats.baseStats[(int)BasicStatChart.stats.Mana] = 60; heroes[heroes.Count - 1].stats.baseStats[(int)BasicStatChart.stats.Speed] = 4; heroes[heroes.Count - 1].stats.ResetCurrentStats(); heroes[heroes.Count - 1].activeSpells = new Spell[9] { SpellsAssetLoader.basicMissileArcane, SpellsAssetLoader.basicMissileDark, SpellsAssetLoader.basicMissileEarth, SpellsAssetLoader.basicMissileFire, SpellsAssetLoader.basicMissileGrass, SpellsAssetLoader.basicMissileIce, default(Spell), default(Spell), default(Spell) }; activeObjects.Clear(); activeObjects.AddRange(enemies); activeObjects.AddRange(heroes); }