5-27
- Item class is under the Assets/Scripts/Item
- weapon.csv is under the Assets/Resources
- Add Item script to each weapon game object and set the Id variable through Inspector. The Id should match the item ID in the CSV file
- Drag game objects into the Data Loader prefab so that the Data Loader script could assign CSV data to the corresponding item game object
- Call DataLoader.get_items() to access the item list.
- Prefab下有个Gameobject, 组件都在上面。使用时更改item的ID,在Photon Grabable的脚本中把Player->OVRVameraRig->TrackingSpace->LeftHandAnchor->LeftControllerAnchor->Canvas->Panel->Text拖到item Info里
- 把商品本体拖到Gameobject里作为child
- 在Gameobject里调整collider大小
- 把Gameobject改成对应商品的名字
- 每把武器只能持有一把
- buff类每件最多购买一件
- 回复类可以买若干件