Amel Negra
4 年前
当前提交
96e4f244
共有 31 个文件被更改,包括 366 次插入 和 142 次删除
-
2UOP1_Project/Assets/Art/Accessories/EarCurls/earCurls.mat
-
2UOP1_Project/Assets/Art/Accessories/Moustache/moustache.mat
-
4UOP1_Project/Assets/Localization Files/Asset Tables/Inventory/Inventory Item Action Shared Data.asset
-
4UOP1_Project/Assets/Localization Files/Asset Tables/Inventory/Inventory Item Action_en.asset
-
4UOP1_Project/Assets/Localization Files/Asset Tables/Inventory/Inventory Item Action_fr.asset
-
82UOP1_Project/Assets/Prefabs/UI/InventoryScreen.prefab
-
150UOP1_Project/Assets/Scenes/Examples/InteractionExample.unity
-
120UOP1_Project/Assets/Scenes/Gameplay.unity
-
2UOP1_Project/Assets/ScriptableObjects/Inventory/ItemTypes/Dish.asset
-
4UOP1_Project/Assets/Scripts/Inventory/InventoryManager.cs
-
22UOP1_Project/Assets/Scripts/Inventory/UIInventoryManager.cs
-
8UOP1_Project/Assets/Scripts/UI/UIManager.cs
-
2UOP1_Project/Assets/Scripts/UI/UIDialogueManager.cs
-
3UOP1_Project/Assets/Scripts/UI/UIInteractionItemFiller.cs
-
4UOP1_Project/Assets/Scripts/UI/UIInteractionManager.cs
-
8UOP1_Project/Assets/Prefabs/Managers.meta
-
51UOP1_Project/Assets/Prefabs/Managers/InventoryManager.prefab
-
7UOP1_Project/Assets/Prefabs/Managers/InventoryManager.prefab.meta
-
18UOP1_Project/Assets/Scripts/Inventory/InventoryController.cs
-
11UOP1_Project/Assets/Scripts/Inventory/InventoryController.cs.meta
-
0/UOP1_Project/Assets/Scripts/Inventory/UIInventoryManager.cs.meta
-
0/UOP1_Project/Assets/Scripts/Inventory/UIInventoryManager.cs
-
0/UOP1_Project/Assets/Scripts/UI/UIDialogueManager.cs.meta
-
0/UOP1_Project/Assets/Scripts/UI/UIDialogueManager.cs
-
0/UOP1_Project/Assets/Prefabs/Managers/UIManager.prefab.meta
-
0/UOP1_Project/Assets/Prefabs/Managers/UIManager.prefab
-
0/UOP1_Project/Assets/Scripts/UI/UIInteractionItemFiller.cs
-
0/UOP1_Project/Assets/Scripts/UI/UIInteractionItemFiller.cs.meta
-
0/UOP1_Project/Assets/Scripts/UI/UIInteractionManager.cs
-
0/UOP1_Project/Assets/Scripts/UI/UIInteractionManager.cs.meta
|
|||
fileFormatVersion: 2 |
|||
guid: db2af0e873d89ef4b8e56268a67d0980 |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
%YAML 1.1 |
|||
%TAG !u! tag:unity3d.com,2011: |
|||
--- !u!1 &1970466629595806519 |
|||
GameObject: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
serializedVersion: 6 |
|||
m_Component: |
|||
- component: {fileID: 1970466629595806505} |
|||
- component: {fileID: 1970466629595806518} |
|||
m_Layer: 0 |
|||
m_Name: InventoryManager |
|||
m_TagString: Untagged |
|||
m_Icon: {fileID: 0} |
|||
m_NavMeshLayer: 0 |
|||
m_StaticEditorFlags: 0 |
|||
m_IsActive: 1 |
|||
--- !u!4 &1970466629595806505 |
|||
Transform: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 1970466629595806519} |
|||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} |
|||
m_LocalPosition: {x: -0.475743, y: -10.206712, z: -4.8572383} |
|||
m_LocalScale: {x: 1, y: 1, z: 1} |
|||
m_Children: [] |
|||
m_Father: {fileID: 0} |
|||
m_RootOrder: 0 |
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} |
|||
--- !u!114 &1970466629595806518 |
|||
MonoBehaviour: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_GameObject: {fileID: 1970466629595806519} |
|||
m_Enabled: 1 |
|||
m_EditorHideFlags: 0 |
|||
m_Script: {fileID: 11500000, guid: dfa86533a7b7743acbbf3e79c9337aa4, type: 3} |
|||
m_Name: |
|||
m_EditorClassIdentifier: |
|||
currentInventory: {fileID: 11400000, guid: 59c84467f7726dc4587a8373b0936f03, type: 2} |
|||
CookRecipeEvent: {fileID: 11400000, guid: 1a56201d2b4714889a387c20fbd8f3e8, type: 2} |
|||
UseItemEvent: {fileID: 11400000, guid: cbe9057614db5422a97c4c250c742f06, type: 2} |
|||
EquipItemEvent: {fileID: 11400000, guid: 0cef922101fd44b25a2d96f2972d5f50, type: 2} |
|||
AddItemEvent: {fileID: 11400000, guid: 582b52ca2b84a41528fe274eea1ced6a, type: 2} |
|||
RemoveItemEvent: {fileID: 11400000, guid: 4ed6ade94b85c452094b0147619e8b49, type: 2} |
|
|||
fileFormatVersion: 2 |
|||
guid: 9e5d964358f2bcc4db1c7e33aace9d8d |
|||
PrefabImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using UnityEngine; |
|||
|
|||
// Created with collaboration from:
|
|||
// https://forum.unity.com/threads/inventory-system.980646/
|
|||
public class InventoryController : MonoBehaviour |
|||
{ |
|||
[SerializeField] |
|||
private Inventory _inventory = default; |
|||
|
|||
private void OnTriggerEnter(Collider other) |
|||
{ |
|||
if (other.TryGetComponent<ItemInstance>(out ItemInstance itemInstance)) |
|||
{ |
|||
_inventory.Add(itemInstance.Item); |
|||
Destroy(itemInstance.gameObject); |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 9d977368908c08a4798b90a8757a255b |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
撰写
预览
正在加载...
取消
保存
Reference in new issue