示例#1
0
        public override void CreateHUD()
        {
            Add(coinImage           = new HUDAnimatedImage(15, Textures.array_coin, Block.BLOCK_WIDTH, Block.BLOCK_HEIGHT), 10, 10, HUDElementAlign.HEA_TL);
            Add(coinNumberDisplay_1 = new HUDNumberDisplay(0, Block.BLOCK_WIDTH, Block.BLOCK_HEIGHT), 30, 10, HUDElementAlign.HEA_TL);
            Add(coinNumberDisplay_2 = new HUDNumberDisplay(0, Block.BLOCK_WIDTH, Block.BLOCK_HEIGHT), 50, 10, HUDElementAlign.HEA_TL);

            Add(headImage           = new HUDImage(Textures.texture_mariohead, Block.BLOCK_WIDTH, Block.BLOCK_HEIGHT), 90, 10, HUDElementAlign.HEA_TL);
            Add(headNumberDisplay_1 = new HUDNumberDisplay(2, Block.BLOCK_WIDTH, Block.BLOCK_HEIGHT), 110, 10, HUDElementAlign.HEA_TL);
            Add(headNumberDisplay_2 = new HUDNumberDisplay(2, Block.BLOCK_WIDTH, Block.BLOCK_HEIGHT), 130, 10, HUDElementAlign.HEA_TL);

            Add(timeDisplay_1 = new HUDNumberDisplay(1, Block.BLOCK_WIDTH / 2.0, Block.BLOCK_HEIGHT / 2.0), 40, 0, HUDElementAlign.HEA_TR);
            Add(timeDisplay_2 = new HUDNumberDisplay(1, Block.BLOCK_WIDTH / 2.0, Block.BLOCK_HEIGHT / 2.0), 30, 0, HUDElementAlign.HEA_TR);
            Add(timeDisplay_3 = new HUDNumberDisplay(1, Block.BLOCK_WIDTH / 2.0, Block.BLOCK_HEIGHT / 2.0), 20, 0, HUDElementAlign.HEA_TR);
            Add(timeDisplay_4 = new HUDNumberDisplay(1, Block.BLOCK_WIDTH / 2.0, Block.BLOCK_HEIGHT / 2.0), 10, 0, HUDElementAlign.HEA_TR);
            Add(timeDisplay_5 = new HUDNumberDisplay(1, Block.BLOCK_WIDTH / 2.0, Block.BLOCK_HEIGHT / 2.0), 00, 0, HUDElementAlign.HEA_TR);

            coinCounter = new HUDNumberCounter();
            coinCounter.AddCounter(coinNumberDisplay_1);
            coinCounter.AddCounter(coinNumberDisplay_2);

            headCounter = new HUDNumberCounter();
            headCounter.AddCounter(headNumberDisplay_1);
            headCounter.AddCounter(headNumberDisplay_2);

            timeCounter = new HUDNumberCounter();
            timeCounter.AddCounter(timeDisplay_1);
            timeCounter.AddCounter(timeDisplay_2);
            timeCounter.AddCounter(timeDisplay_3);
            timeCounter.AddCounter(timeDisplay_4);
            timeCounter.AddCounter(timeDisplay_5);
        }
示例#2
0
        public void AddCounter(HUDNumberDisplay c)
        {
            counterList.Add(c);

            UpdateCounter();
        }