Exemple #1
0
        public Minigame(Game1 game)
            : base(game)
        {
            this.game = game;
            manager = new MgManager(this, game);
            screen = new MgScreen(this, manager, game);
            manager.screen = screen;
            hudMg = game.hud.hudMg;

            active = false;

            successCount = 0;
            maxBeats = 12;
            maxDubs = 4;
            holdTime = 0;

            displayer = new MgDisplayer(this, manager, game);
            game.modelManager.addEffect(displayer);

            models = new MgModelManager(game, this);

            defaultInstance = new MgInstance(game, this);
            defaultInstance.generateNew();
            manager.loadInstance(defaultInstance);
            manager.reset();

            game.hud.expSelect.setMinigame(this);
            triggeredHelp = false;
        }
Exemple #2
0
        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");
        }