//------------------------------------------------------------------------/ // Properties //------------------------------------------------------------------------/ //------------------------------------------------------------------------/ // Methods //------------------------------------------------------------------------/ public override void Loot(LootRange range) { // Send the loot event to the space. Any inventories will pick it up. var lootEvent = new LootEvent(); lootEvent.Object = this; if (range == LootRange.Space) { Scene.Dispatch <LootEvent>(lootEvent); } // Send a system message? if (IsAnnouncing) { //var message = new Message(); //message.Title = "Item looted!"; //message.Description = "You looted <b>" + Item.Name + "</b> !"; //SystemMessageDispatcher.Dispatch(message); } // Depending on the type of item looted, send a loot event Destroy(this.gameObject); }
/// <summary> /// Loots the item contained by this object, adding it to the player's inventory. /// This will also destroy this object. /// </summary> public abstract void Loot(LootRange range);