Exemplo n.º 1
0
 public UserInterface(Game game)
 {
     gameTimer    = new Timer();
     healthBar    = new HealthBar(game);
     energyBar    = new EnergyBars(healthBar, game);
     playerName   = new PlayerName(game, healthBar);
     round        = new Round(healthBar);
     animationsUI = new AnimationsUI();
 }
Exemplo n.º 2
0
        internal void UpdateEnergyFlame(EnergyBars energyBars)
        {
            if (_clock.ElapsedTime.AsSeconds() > _energyTimer + 0.02f)
            {
                _blueFlame1.Texture  = _animation_BlueFlame[_blueFlameCount].Texture;
                _blueFlame1.Position = new Vector2f(energyBars.EnergyBar[0].Position.X + energyBars.EnergyBar[0].Size.X - 30f, energyBars.EnergyBar[0].Position.Y - energyBars.EnergyBar[0].Size.Y);

                _blueFlame2.Texture  = _animation_BlueFlame[_blueFlameCount].Texture;
                _blueFlame2.Position = new Vector2f(energyBars.EnergyBar[1].Position.X - energyBars.EnergyBar[1].Size.X - 30f, energyBars.EnergyBar[1].Position.Y - energyBars.EnergyBar[1].Size.Y);

                _energyTimer += 0.115f;
                if (_blueFlameCount < 18)
                {
                    _blueFlameCount++;
                }
                else
                {
                    _blueFlameCount = 14;
                }
            }
        }
Exemplo n.º 3
0
 internal void Update(Game game, EnergyBars energyBars)
 {
     this.UpdateEnergyBar(game._fighter1.Energy, game._fighter2.Energy);
     blueFlames.UpdateEnergyFlame(energyBars);
 }