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 Hud(Game1 game, SpriteFont font, SpriteBatch spriteBatch, GraphicsDevice graphicsDevice) : base(game) { this.game = game; ship = game.ship; this.font = font; this.spriteBatch = spriteBatch; this.graphicsDevice = graphicsDevice; hudMoney = new HudMoney(this, font, game); hudWeapon = new HudWeapon(this, font, game); hudHealth = new HudHealth(this, font, game); hudState = new HudState(this, font, game); hudMap = new HudMap(this, font, game); hudMessage = new HudMessage(this, font, game); hudMg = new HudMg(this, game.Content.Load<SpriteFont>(@"Hud/Venera900big"), game); hudCollectable = new HudCollectable(this, font, game); viewportW = game.GraphicsDevice.Viewport.Width; viewportH = game.GraphicsDevice.Viewport.Height; hudAttackDisplayer = new HudAttackDisplayer(game, this); quickSelect = new QuickSelect(this, game, font); expSelect = new ExpSelect(this, game, font); turSelect = new TurretSelect(this, game, font); hudPrompt = new HudPrompt(this, game, font); respawn = new HudRespawn(this, hudMg.font, game); hudHelp = new HudHelp(this, game, font); hudEnd = new HudEnd(this, game); hudZoom = new HudZoom(this, game); position = new Vector2(0, 0); contPrimary = Color.White; contSecondary = new Color(174, 215, 255); outline = new Color(0, 64, 127); fill = new Color(0, 16, 73, 179); redBody = new Color(181, 77, 102); blueBody = new Color(86, 124, 193); whiteTex = new Texture2D(graphicsDevice, 1, 1); whiteTex.SetData(new Color[] { Color.White }); flashTime = 15; scale = (float)game.GraphicsDevice.Viewport.Bounds.Width / 1920.0f; butA = game.Content.Load<Texture2D>(@"Hud/butA"); butB = game.Content.Load<Texture2D>(@"Hud/butB"); butX = game.Content.Load<Texture2D>(@"Hud/butX"); butY = game.Content.Load<Texture2D>(@"Hud/butY"); endO = game.Content.Load<Texture2D>(@"Hud/endO"); endF = game.Content.Load<Texture2D>(@"Hud/endF"); }