public HudZoom(Hud hud, Game1 game) { this.hud = hud; this.game = game; alpha = 0; maxScale = 0.1f; }
public HudMg(Hud hud, SpriteFont font, Game1 game) : base(hud, font, game) { active = false; updateText(); }
public HudPrompt(Hud hud, Game1 game, SpriteFont font) { this.hud = hud; this.game = game; this.font = font; pos = new Vector2(960, 350); promptFill = game.Content.Load<Texture2D>(@"Hud/promptFill"); promptOut = game.Content.Load<Texture2D>(@"Hud/promptOut"); }
public HudHelp(Hud hud, Game1 game, SpriteFont font) { this.hud = hud; this.game = game; this.font = font; line1 = "To unlock the energy cache:"; line2 = "press the corresponding dPad button"; line3 = "as the markers reach the target."; line4 = "reach the end without missing 3"; line5 = "to earn money and weapon exp!"; }
public HudMessage(Hud hud, SpriteFont font, Game1 game) : base(hud, font, game) { mesFil = game.Content.Load<Texture2D>(@"Hud/mesFill"); mesOut = game.Content.Load<Texture2D>(@"Hud/mesOut"); wakeThresh = 2; wakeTime = wakeThresh; message = ""; pos = new Vector2(960, 960); }
public HudState(Hud hud, SpriteFont font, Game1 game) : base(hud, font, game) { statPos = new Vector2(45, 934); statNamePos = new Vector2(180, 972); statTimePos = new Vector2(180, 1012); waveManager = game.waveManager; hudStatF = game.Content.Load<Texture2D>(@"Hud/statO"); hudStatB = game.Content.Load<Texture2D>(@"Hud/statF"); }
public HudRespawn(Hud hud, SpriteFont font, Game1 game) { active = true; state = 5; time = 1.5f; this.hud = hud; this.font = font; this.game = game; ship = game.ship; updateText(); }
public HudCollectable(Hud hud, SpriteFont font, Game1 game) : base(hud, font, game) { boxO = game.Content.Load<Texture2D>(@"Hud/cardOut"); boxF = game.Content.Load<Texture2D>(@"Hud/cardFill"); wakeThresh = 3; //wakeTime = wakeThresh; count = 0; pos = new Vector2(1840, 300); }
public HudMoney(Hud hud, SpriteFont font, Game1 game) : base(hud, font, game) { monPos = new Vector2(1450, 45); monTotPos = new Vector2(1700, 100); monDifPos = new Vector2(1690, 180); wakeThresh = 3; hudMonF = game.Content.Load<Texture2D>(@"Hud/hudMonF"); hudMonB = game.Content.Load<Texture2D>(@"Hud/hudMonB"); moneyTot = ""; moneyDif = ""; }
public QuickSelect(Hud hud, Game1 game, SpriteFont font) { this.hud = hud; this.game = game; this.font = font; wepSys = game.ship.weapons; solidWhite = new Texture2D(game.GraphicsDevice, 1, 1); solidWhite.SetData(new Color[] { Color.White }); out4 = game.Content.Load<Texture2D>(@"Hud/QuickSelect/qsOut4"); out4_1 = game.Content.Load<Texture2D>(@"Hud/QuickSelect/qsOut4-1"); out4_2 = game.Content.Load<Texture2D>(@"Hud/QuickSelect/qsOut4-2"); out4_3 = game.Content.Load<Texture2D>(@"Hud/QuickSelect/qsOut4-3"); out4_4 = game.Content.Load<Texture2D>(@"Hud/QuickSelect/qsOut4-4"); out5 = game.Content.Load<Texture2D>(@"Hud/QuickSelect/qsOut5"); out5_1 = game.Content.Load<Texture2D>(@"Hud/QuickSelect/qsOut5-1"); out5_2 = game.Content.Load<Texture2D>(@"Hud/QuickSelect/qsOut5-2"); out5_3 = game.Content.Load<Texture2D>(@"Hud/QuickSelect/qsOut5-3"); out5_4 = game.Content.Load<Texture2D>(@"Hud/QuickSelect/qsOut5-4"); out5_5 = game.Content.Load<Texture2D>(@"Hud/QuickSelect/qsOut5-5"); fill4 = game.Content.Load<Texture2D>(@"Hud/QuickSelect/qsFill4"); fill5 = game.Content.Load<Texture2D>(@"Hud/QuickSelect/qsFill5"); hi1 = game.Content.Load<Texture2D>(@"Hud/QuickSelect/qsHi1"); hi2 = game.Content.Load<Texture2D>(@"Hud/QuickSelect/qsHi2"); hi3 = game.Content.Load<Texture2D>(@"Hud/QuickSelect/qsHi3"); hi4 = game.Content.Load<Texture2D>(@"Hud/QuickSelect/qsHi4"); hi5 = game.Content.Load<Texture2D>(@"Hud/QuickSelect/qsHi5"); barMask = game.Content.Load<Texture2D>(@"Hud/Masks/qsMask"); imgW = out4.Bounds.Width; imgH = out4.Bounds.Height; currentFill = fill4; currentOut = out4; currentHi = hi1; targ1 = new RenderTarget2D(game.GraphicsDevice, 123, 15); targ2 = new RenderTarget2D(game.GraphicsDevice, 123, 15); sb = new SpriteBatch(game.GraphicsDevice); alphaMap = TextureManager.alphaMap; }
public HudMap(Hud hud, SpriteFont font, Game1 game) : base(hud, font, game) { minimap = new Minimap(game); mapPos = new Vector2(1455, 752); hudMapF = game.Content.Load<Texture2D>(@"Hud/mapF"); mask = game.Content.Load<Texture2D>(@"Hud/mapMask"); hudMapB = game.Content.Load<Texture2D>(@"Hud/mapO"); alphaMap = game.Content.Load<Effect>(@"Effects/AlphaMap"); barMask = game.Content.Load<Texture2D>(@"Hud/Masks/mapBar"); barTarg = new RenderTarget2D(game.GraphicsDevice, 272, 16); rTarg = new RenderTarget2D(game.GraphicsDevice, 402, 283); mapTarg = new RenderTarget2D(game.GraphicsDevice, 402, 283); spB = new SpriteBatch(game.GraphicsDevice); }
public HudWave(Game1 game, Hud hud, HudAttackDisplayer displayer, Vector2 pos, Wave wave) { this.hud = hud; this.displayer = displayer; font = hud.font; this.wave = wave; setPictures(wave.enemyType); this.pos = pos; goalPos = pos; flashing = true; firstInList = false; moving = false; this.game = game; targ1 = new RenderTarget2D(game.GraphicsDevice, 170, 89); targ2 = new RenderTarget2D(game.GraphicsDevice, 170, 89); sb = new SpriteBatch(game.GraphicsDevice); alphaMap = TextureManager.alphaMap; }
public HudWeapon(Hud hud, SpriteFont font, Game1 game) : base(hud, font, game) { wepSys = game.ship.weapons; wakeThresh = 5; wepPos = new Vector2(45, 45); wepAmmoPos = new Vector2(325, 90); barTarg = new RenderTarget2D(game.GraphicsDevice, 180, 15); maskTarg = new RenderTarget2D(game.GraphicsDevice, 180, 15); sb = new SpriteBatch(game.GraphicsDevice); hudWepF = game.Content.Load<Texture2D>(@"Hud/hudWepF"); hudWepB = game.Content.Load<Texture2D>(@"Hud/hudWepB"); hudWepF2 = game.Content.Load<Texture2D>(@"Hud/hudWepO2"); hudWepB2 = game.Content.Load<Texture2D>(@"Hud/hudWepF2"); mask = game.Content.Load<Texture2D>(@"Hud/Masks/expBar"); alphaMap = TextureManager.alphaMap; }
public TurretSelect(Hud hud, Game1 game, SpriteFont font) { this.hud = hud; this.game = game; this.font = font; qs = hud.quickSelect; wepSys = game.ship.weapons; imgW = qs.out4.Bounds.Width; imgH = qs.out4.Bounds.Height; currentHi = hud.quickSelect.hi1; newTurr = true; loadImages(); rTarg = new RenderTarget2D(game.GraphicsDevice, 512, 512); sb = new SpriteBatch(game.GraphicsDevice); modelManager = new TsModelManager(game); }
public ExpSelect(Hud hud, Game1 game, SpriteFont font) { this.hud = hud; this.game = game; this.font = font; qs = hud.quickSelect; wepSys = game.ship.weapons; imgW = qs.out4.Bounds.Width; imgH = qs.out4.Bounds.Height; currentHi = hud.quickSelect.hi1; helpO = game.Content.Load<Texture2D>(@"Hud/qhelpO"); helpF = game.Content.Load<Texture2D>(@"Hud/qhelpF"); targ1 = new RenderTarget2D(game.GraphicsDevice, 123, 15); targ2 = new RenderTarget2D(game.GraphicsDevice, 123, 15); sb = new SpriteBatch(game.GraphicsDevice); alphaMap = TextureManager.alphaMap; }
public HudAttackDisplayer(Game1 game, Hud hud) { this.game = game; this.hud = hud; this.enemyManager = game.enemyManager; sb = new SpriteBatch(game.GraphicsDevice); messageType = MessageType.end; waveDisplays = new List<HudWave>(); bigFont = game.Content.Load<SpriteFont>(@"Hud/Venera900big"); waveStartFill = game.Content.Load<Texture2D>(@"Hud/AttackDisplay/attackStartFill"); waveStartOut = game.Content.Load<Texture2D>(@"Hud/AttackDisplay/attackStartOut"); warnMark = game.Content.Load<Texture2D>(@"Hud/AttackDisplay/warnMark"); warnFill = game.Content.Load<Texture2D>(@"Hud/AttackDisplay/warnFill"); warnOut1 = game.Content.Load<Texture2D>(@"Hud/AttackDisplay/warnOut1"); warnOut2 = game.Content.Load<Texture2D>(@"Hud/AttackDisplay/warnOut2"); warnOut2w = game.Content.Load<Texture2D>(@"Hud/AttackDisplay/warnOut2-w"); attackOverFill = game.Content.Load<Texture2D>(@"Hud/AttackDisplay/attackOverFill"); attackOverOut = game.Content.Load<Texture2D>(@"Hud/AttackDisplay/attackOverOut"); swaSml = game.Content.Load<Texture2D>(@"Hud/AttackDisplay/swaSml"); swaBig = game.Content.Load<Texture2D>(@"Hud/AttackDisplay/swaBig"); sneSml = game.Content.Load<Texture2D>(@"Hud/AttackDisplay/sneSml"); sneBig = game.Content.Load<Texture2D>(@"Hud/AttackDisplay/sneBig"); gunSml = game.Content.Load<Texture2D>(@"Hud/AttackDisplay/gunSml"); gunBig = game.Content.Load<Texture2D>(@"Hud/AttackDisplay/gunBig"); hevSml = game.Content.Load<Texture2D>(@"Hud/AttackDisplay/hevSml"); hevBig = game.Content.Load<Texture2D>(@"Hud/AttackDisplay/hevBig"); barMask = game.Content.Load<Texture2D>(@"Hud/Masks/waveMask"); wavOut = game.Content.Load<Texture2D>(@"Hud/AttackDisplay/waveOut"); wavOutW = game.Content.Load<Texture2D>(@"Hud/AttackDisplay/waveOutW"); wavFill = game.Content.Load<Texture2D>(@"Hud/AttackDisplay/waveFill"); warnMidPos = new Vector2(960, 360); warnSidePos = new Vector2(150, 350); currentWarnPos = warnMidPos; }
public HudHealth(Hud hud, SpriteFont font, Game1 game) : base(hud, font, game) { healthPos = new Vector2(659, 45); shieldBarPos = new Vector2(960, 75); hpBarPos = new Vector2(960, 115); hpSys = game.ship.shipHealth; wakeThresh = 3; targ1 = new RenderTarget2D(game.GraphicsDevice, 603, 104); targ2 = new RenderTarget2D(game.GraphicsDevice, 603, 104); targ3 = new RenderTarget2D(game.GraphicsDevice, 603, 104); sb = new SpriteBatch(game.GraphicsDevice); solidWhite = new Texture2D(game.GraphicsDevice, 1, 1); solidWhite.SetData(new Color[] { Color.White }); hudHealthF = game.Content.Load<Texture2D>(@"Hud/hudHealthF"); hudHealthB = game.Content.Load<Texture2D>(@"Hud/hudHealthB"); shieldMask = game.Content.Load<Texture2D>(@"Hud/Masks/hudHealthM1"); hpMask = game.Content.Load<Texture2D>(@"Hud/Masks/hudHealthM2"); alphaMap = TextureManager.alphaMap; }
public HudComponent(Hud hud, SpriteFont font, Game1 game) { this.hud = hud; this.font = font; this.game = game; }
public void initializeGame(string level) { loadPercentage = 0; if (!loadedGameContent) { TextureManager.initialize(this); loadPercentage = 0.1f; ModelLibrary.initialize(this); loadPercentage = 0.2f; loadPercentage = 0.25f; loadedGameContent = true; } modelManager = new ModelManager(this); ship = new Ship(this); core = new BaseCore(this); camera = new Camera(this, new Vector3(40, 150, 10), Vector3.Zero, Vector3.Up); turretManager = new TurretManager(this); asteroidManager = new AsteroidManager(this); enemyManager = new EnemyManager(this); waveManager = new WaveManager(this); hud = new Hud(this, Content.Load<SpriteFont>(@"Hud/Venera40"), spriteBatch, GraphicsDevice); minigame = new Minigame(this); levelStats = new StatTracker(); loadPercentage = 0.65f; levelFileName = "dends"; //levelFileName = "map1-revis"; //levelFileName = "pac-man"; layout = new MapData(level); //layout = new MapData(@"Content/MapXml/Level2.xml"); //layout = new MapData(@"Content/MapXml/pac-man.xml"); //layout = new MapData(@"Content/MapXml/broktes.xml"); map = new Map(this, layout.getNodes()); bloom = new BloomComponent(this); Components.Add(ship); Components.Add(camera); Components.Add(modelManager); Components.Add(enemyManager); Components.Add(waveManager); Components.Add(core); Components.Add(turretManager); Components.Add(asteroidManager); Components.Add(minigame); //make sure the post process effects go second last, and the hud is absolute last //Components.Add(bloom); Components.Add(hud); loadPercentage = 1f; modelManager.makeStarField(); turretManager.Initialize(); //Debugging stuff for A* shortestPath = new Pathfinder(map); turretAvoid = new PathfinderTurretAvoid(map); System.Diagnostics.Debug.WriteLine("A new map has been loaded, our pathfinding algorithm is now finding the shortest path from each enemy spawn to the core"); List<Vector2> spawns = map.getEnemySpawn(); System.Diagnostics.Debug.WriteLine("There are " + spawns.Count() + " enemy spawn point(s) in this map"); int count = 1; foreach(Vector2 spawn in spawns) { List<Vector2> path = shortestPath.findPath(new Point((int)spawn.X, (int)spawn.Y), new Point((int)map.getCoreLocation().X, (int)map.getCoreLocation().Y)); System.Diagnostics.Debug.WriteLine("The path from spawn " + count + " is as follows:"); foreach(Vector2 nodePos in path) { System.Diagnostics.Debug.WriteLine(nodePos); } count++; } justLoadedContent = true; }
public HudEnd(Hud hud, Game1 game) { this.game = game; this.hud = hud; this.font = hud.hudMg.font; }