Ejemplo n.º 1
0
 public void addOrb(Orb.tOrb type)
 {
     switch (type)
     {
         case Orb.tOrb.XP:
             SoundManager.Instance.playEffect("pickXPOrb");
             ++owner.data.XP;
             ++owner.data.totalXP;
             break;
         case Orb.tOrb.Life:
             SoundManager.Instance.playEffect("pickLifeOrb");
             ++owner.data.lifeOrbs;
             ++lifePortions;
             if (lifePortions > getMaxLifePortions())
             {
                 lifePortions = getMaxLifePortions();
             }
             break;
     }
 }
Ejemplo n.º 2
0
 public void addOrb(Orb.tOrb orbType, Vector2 position, bool toPlayer, float speed)
 {
     Orb orb = new Orb(orbType, position, toPlayer, speed);
     orbs.Add(orb);
 }