lazrcat0/Hoarder — pull request #25 by LochNeffMonster (2014-05-21 06:38:38+00:00)
Title: Hoard Lair and Valuable components

I added a Valuable component that can be added to any gameobject. Once added, the designer can enter the name of the object as a string and the value as a float. We can add more to it later, but this gets us started at least.

I also added a HoardLair component that can be added to a trigger volume. Once an object enters the trigger volume, it checks to see if it is a valuable, and if so adds the valuable to it's list of valuables and increments the total value of the hoarded items. Removing an item for the trigger volume also removes the valuable from the list and running total.

Fixes #6
Fixes #8

To test:
* go to the ScoringTestScene I made
* check out the weirdly lit texture box, that's the Hoarder's Lair
* pick up any of the objects and drag it into the lair
* notice that the debug statement tells you the current running total of the hoarded items in the lair
* remove the item from the lair, and see the debug which confirms that the valuable was removed from the hoarded items list

Note: any area you want as a HoardLair should be set as a trigger collider, as well as put on the ignore raycast layer so that the player doesn't have issues grabbing items through the walls of the trigger volume.