using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using HumanLikeBattleRobots.Graphic;

namespace HumanLikeBattleRobots.Logic
{
    class HealthBonus: Bonus
    {
        public HealthBonus(Vec2f position)
            : base(position)
        {
            sprite = new BonusSprite(1, 0);
            sprite.Position = position;
        }

        protected override void ApplyBonus()
        {
            if (GameManager.myRobot.Health == 10)
                return;
            GameManager.myRobot.Health += 2;
            if (GameManager.myRobot.Health > 10)
                GameManager.myRobot.Health = 10;

            GameManager.otherObjects.Remove(this);
        }
    }
}
