public void Update(Player player, GameTime gameTime) { health = (int)MathHelper.Clamp(health, 0, 100); shield = (int)MathHelper.Clamp(shield, 0, 100); capacity = (int)MathHelper.Clamp(capacity, 0, 15); health = (int)player._health; shield = (int)player._shield; capacity = (int)player.capacity; playerPosition = player._pos; }
protected override void Initialize() { player = new Player(); hud = new HUD(); children.Add(player); for (int i = 0; i < children.Count; i++) { children[i].Initialize(); } base.Initialize(); }