public override void Buy(Robot robot) { robot.ShopList.Remove(this); robot.Coins -= Price; ApplyUpgrade(robot); }
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ public override void PickUp(Robot robot) { robot.Coins += COIN_VALUE; }
public override void ApplyUpgrade(Robot robot) { robot.MaxSpeed += SPEED_BONUS; robot.Speed += SPEED_BONUS; }
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ /// <summary> /// Allows the player to get the item. /// </summary> public abstract void PickUp(Robot robot);
public override void ApplyUpgrade(Robot robot) { robot.BatteryBonus += TIME_BONUS; }
public abstract void Buy(Robot robot);
/// <summary> /// apply the Upgrade to the Robot /// </summary> /// <param name="robot">The Robot who will receive the upgrade</param> public abstract void ApplyUpgrade(Robot robot);
public override void ApplyUpgrade(Robot robot) { robot.MaxHealth += HEALTH_BONUS; }
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ public override void PickUp(Robot robot) { }
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ public override void PickUp(Robot robot) { LevelTimer.CurrentTime += TIME_BONUS_VALUE; }