MiniGame Mods
MiniGame Modifications to Integrate Inventory System
Modify PlayerController.cs by updating code in OnTriggerEnter that reflects changes needed to integrate the inventory system with player collisions with collectible and hazard game objects. The Hazard.cs script was included with the InventorySystem Package.
Note: GameData.cs was included in the updated Scripts for InventorySystem, it had logic to clear the inventory each time the startButton was clicked in the MiniGame using the MiniGameManager.cs script from Project 1. The logic in GameData has been commented out. See second code block below
Update Spawned Prefabs:
Items with tag: Hazard must have the PickUp script removed, they must have the Hazard.cs script attached.
Items with tag: Collectible must have the updated PickUp script. This requires that the Prefab be modified by attaching a ScriptableObject for the ItemInstance: Item, as in the image below. So, create ScriptableObjects that correspond with your custom Concrete custom class, then add those items to your Collectible Prefabs. See Video below for steps
Updated GameData.cs - 4/13/20
No longer clears the inventory when ResetGameData( ) is executed.
Last updated