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; }
public void setLoot(Loot inLoot) { this.m_loot = inLoot; }
public void spawnLoot(Loot inLoot, Point inPosition) { Field field = this.getFieldAt(inPosition); if(field != null) { field.setLoot(inLoot); this.m_currentLoot.Add(inLoot); } }
public Field(FieldType inType) { this.m_type = inType; this.m_loot = null; this.m_entity = null; }