Beispiel #1
0
        public bool loot(Loot inLoot)
        {
            if (inLoot is HealthPot)
                m_pots.Enqueue((HealthPot)inLoot);
            else if (inLoot is Weapon)
            {
                if (getWeapon() == null)
                {
                    // Equip weapon
                    m_weapon = (Weapon)inLoot;
                }
                else
                {
                    // A weapon is already equiped
                    return false;
                }
            }
            else if(inLoot is Boost)
                this.m_boosts.Add((Boost)inLoot);

            // Return looting success

            return true;
        }
Beispiel #2
0
 public void setLoot(Loot inLoot)
 {
     this.m_loot = inLoot;
 }
Beispiel #3
0
 public void spawnLoot(Loot inLoot, Point inPosition)
 {
     Field field = this.getFieldAt(inPosition);
     if(field != null)
     {
         field.setLoot(inLoot);
         this.m_currentLoot.Add(inLoot);
     }
 }
Beispiel #4
0
 public Field(FieldType inType)
 {
     this.m_type = inType;
     this.m_loot = null;
     this.m_entity = null;
 }