Exemple #1
0
        public GameHUD()
        {
            const float scoreY = Constants.SCREEN_HEIGHT - 20f;

            score1 = new Azul.SpriteFont("SCORE<1>", Azul.AZUL_FONTS.Consolas36pt, Constants.SCREEN_WIDTH * .05f, scoreY);
            score2 = new Azul.SpriteFont("SCORE<2>", Azul.AZUL_FONTS.Consolas36pt, Constants.SCREEN_WIDTH * .83f, scoreY);
            hiScoreHeader = new Azul.SpriteFont("HI-SCORE", Azul.AZUL_FONTS.Consolas36pt, Constants.SCREEN_WIDTH * .45f, scoreY);
            p1Score = new Azul.SpriteFont("0000", Azul.AZUL_FONTS.Consolas36pt, Constants.SCREEN_WIDTH * .08f, scoreY - 40f);
            p2Score = new Azul.SpriteFont("0000", Azul.AZUL_FONTS.Consolas36pt, Constants.SCREEN_WIDTH * .87f, scoreY - 40f);
            hiScore = new Azul.SpriteFont("0000", Azul.AZUL_FONTS.Consolas36pt, Constants.SCREEN_WIDTH * .48f, scoreY - 40f);
            credit = new Azul.SpriteFont("Credit", Azul.AZUL_FONTS.Consolas36pt, Constants.SCREEN_WIDTH * .7f, 45);
            numCredits = new Azul.SpriteFont("0", Azul.AZUL_FONTS.Consolas36pt, Constants.SCREEN_WIDTH * .9f, 45);

            hudLives = new ProxySprite[3]{new ProxySprite(SpriteEnum.Player, Index.Index_Null, 75, 50), new ProxySprite(SpriteEnum.Player, Index.Index_Null, 150, 50),
                                          new ProxySprite(SpriteEnum.Player, Index.Index_Null, 225, 50)};
            hudLives[0].Color = new Azul.Color(0f, 1f, 0f);
            hudLives[1].Color = new Azul.Color(0f, 1f, 0f);
            hudLives[2].Color = new Azul.Color(0f, 1f, 0f);

            hudTypes = new HUDStrategy[2] { new SplashScreenHUD(), new NullSplashHUD() };
        }
Exemple #2
0
 public HudText(float x, float y, string text, Azul.Color color)
 {
     this.internalAzulText = new Azul.SpriteFont(text, HudText.DEFAULT_FONT, x, y);
     this.internalAzulText.setColor(color);
 }
Exemple #3
0
 public override void Reset()
 {
     this.internalAzulText = null;
 }
Exemple #4
0
 public HudText(float x, float y, string text, Azul.AZUL_FONTS font, Azul.Color color)
 {
     this.internalAzulText = new Azul.SpriteFont(text, font, x, y);
     this.internalAzulText.setColor(color);
 }