Although a small number of elements, the core of a game has been created. We have a goal – to collect the crystal and add it to our inventory. We have a challenge – to get through the door. Interactables, such as the pressure pad, which we added to the Scene, send a message to a GameCommandReceiver component in the GameKit. The door can receive commands, so we were able to link the pressure pad to our door.
The inventory system works by having inventory items, such as our crystal, have a Key text inventory – this is like a tag for a GameObject. Characters can have an Inventory Controller component, which has a maximum size, which we set to 1 for our crystal. They also have a list of the text keys permitted for the character's inventory (so we added the Crystal text key to Ellen's Inventory Controller.
We have dipped our toes into the wide range of features of the 3D Game Kit. Hopefully, this recipe...