示例#1
0
 public bool PickupUpgrade(Upgrade upgrade)
 {
     return ListOfUpgrade.Remove(upgrade);
 }
示例#2
0
 public Player ApplyUpgrade(Upgrade u)
 {
     UpgradeType type = u.Type;
     switch (type)
     {
             case UpgradeType.BombUp:
                 BombCount++;
                 AvailableBombCount++;
                 break;
             case UpgradeType.ChangeDirection:
                 InvertedDirections = true;
                 this.changeFace(Texture._.TypetextureList[Texture._.GetTextureKey(this)]);
                 TimerManager._.AddNewTimer(false, 10000, true, new TimerEvent { InvolvedObject = this, Type = EventType.Malediction });
                 break;
             case UpgradeType.Kick:
                 CanKick = true;
                 break;
             case UpgradeType.PowerDown:
                 BombPower--;
                 break;
             case UpgradeType.PowerMax:
                 BombPower = Game.Length;
                 break;
             case UpgradeType.PowerUp:
                 BombPower++;
                 break;
             case UpgradeType.SpeedDown:
                 Speed--;
                 break;
             case UpgradeType.SpeedMax:
                 Speed = 9;
                 break;
             case UpgradeType.SpeedUp:
                 Speed++;
                 break;
             case UpgradeType.Teleport:
                 teleportme = true;
                 break;
             case UpgradeType.Life:
                 Lives++;
                 InGameMenu._.changeLabel(Id, Lives);
                 break;
     }
     return this;
 }
示例#3
0
 public Player ApplyUpgrade(Upgrade u)
 {
     UpgradeType type = u.Type;
     switch (type)
     {
             case UpgradeType.BombUp:
                 BombCount++;
                 break;
             case UpgradeType.ChangeDirection:
                 InvertedDirections = true;
                 break;
             case UpgradeType.Kick:
                 CanKick = true;
                 break;
             case UpgradeType.PowerDown:
                 BombPower--;
                 break;
             case UpgradeType.PowerMax:
                 BombPower = Game.Length;
                 break;
             case UpgradeType.PowerUp:
                 BombPower++;
                 break;
             case UpgradeType.SpeedDown:
                 Speed--;
                 break;
             case UpgradeType.SpeedMax:
                 //TODO: choose a maximum speed
                 break;
             case UpgradeType.SpeedUp:
                 Speed++;
                 break;
             case UpgradeType.Teleport:
                 //Managed by the Game class
                 break;
     }
     return this;
 }
示例#4
0
 public Player AddAndApplyUpgrade(Upgrade u)
 {
     _upgrades.Add(u);
     return ApplyUpgrade(u);
 }
示例#5
0
 public SoftBlock(int x, int y, Upgrade u = null, UpgradeBomb bt = null)
     : base(x, y)
 {
     _myUpgrade = u;
     _myBombSec = bt;
 }