Exemple #1
0
        public void Update(InputState lastInputState, InputState inputState)
        {
            List <HealthBar> healthBars = UIs.OfType <HealthBar>().ToList();

            foreach (var healthBar in healthBars)
            {
                if (healthBar.value > 0)
                {
                    healthBar.value--;
                }
                else
                {
                    healthBar.value = 100;
                }
            }
        }
 public void Update(InputState lastInputState, InputState inputState)
 {
     Label label = UIs.OfType<Label>().First();
     label.UpdateText($"Score: {Game1.gameData.score}");
 }