コード例 #1
0
 public void Update()
 {
     healthBarFill.Width = (int)(healthBar.Width * ((float)player.GetHealth() / player.GetMaxHealth()));
     manaBarFill.Width   = (int)(manaBar.Width * ((float)player.GetMana() / player.GetMaxMana()));
     xpBarFill.Width     = (int)(xpBar.Width * ((float)player.GetXp() / player.GetXpToLevel()));
 }
コード例 #2
0
 private void InitializeHealthBar()
 {
     HealthBar.Value = _player.GetHealth();
 }