浏览代码

Merge remote-tracking branch 'origin/interaction' into interaction

/main
Amel Negra 4 年前
当前提交
96e4f244
共有 31 个文件被更改,包括 366 次插入142 次删除
  1. 2
      UOP1_Project/Assets/Art/Accessories/EarCurls/earCurls.mat
  2. 2
      UOP1_Project/Assets/Art/Accessories/Moustache/moustache.mat
  3. 4
      UOP1_Project/Assets/Localization Files/Asset Tables/Inventory/Inventory Item Action Shared Data.asset
  4. 4
      UOP1_Project/Assets/Localization Files/Asset Tables/Inventory/Inventory Item Action_en.asset
  5. 4
      UOP1_Project/Assets/Localization Files/Asset Tables/Inventory/Inventory Item Action_fr.asset
  6. 82
      UOP1_Project/Assets/Prefabs/UI/InventoryScreen.prefab
  7. 150
      UOP1_Project/Assets/Scenes/Examples/InteractionExample.unity
  8. 120
      UOP1_Project/Assets/Scenes/Gameplay.unity
  9. 2
      UOP1_Project/Assets/ScriptableObjects/Inventory/ItemTypes/Dish.asset
  10. 4
      UOP1_Project/Assets/Scripts/Inventory/InventoryManager.cs
  11. 22
      UOP1_Project/Assets/Scripts/Inventory/UIInventoryManager.cs
  12. 8
      UOP1_Project/Assets/Scripts/UI/UIManager.cs
  13. 2
      UOP1_Project/Assets/Scripts/UI/UIDialogueManager.cs
  14. 3
      UOP1_Project/Assets/Scripts/UI/UIInteractionItemFiller.cs
  15. 4
      UOP1_Project/Assets/Scripts/UI/UIInteractionManager.cs
  16. 8
      UOP1_Project/Assets/Prefabs/Managers.meta
  17. 51
      UOP1_Project/Assets/Prefabs/Managers/InventoryManager.prefab
  18. 7
      UOP1_Project/Assets/Prefabs/Managers/InventoryManager.prefab.meta
  19. 18
      UOP1_Project/Assets/Scripts/Inventory/InventoryController.cs
  20. 11
      UOP1_Project/Assets/Scripts/Inventory/InventoryController.cs.meta
  21. 0
      /UOP1_Project/Assets/Scripts/Inventory/UIInventoryManager.cs.meta
  22. 0
      /UOP1_Project/Assets/Scripts/Inventory/UIInventoryManager.cs
  23. 0
      /UOP1_Project/Assets/Scripts/UI/UIDialogueManager.cs.meta
  24. 0
      /UOP1_Project/Assets/Scripts/UI/UIDialogueManager.cs
  25. 0
      /UOP1_Project/Assets/Prefabs/Managers/UIManager.prefab.meta
  26. 0
      /UOP1_Project/Assets/Prefabs/Managers/UIManager.prefab
  27. 0
      /UOP1_Project/Assets/Scripts/UI/UIInteractionItemFiller.cs
  28. 0
      /UOP1_Project/Assets/Scripts/UI/UIInteractionItemFiller.cs.meta
  29. 0
      /UOP1_Project/Assets/Scripts/UI/UIInteractionManager.cs
  30. 0
      /UOP1_Project/Assets/Scripts/UI/UIInteractionManager.cs.meta

2
UOP1_Project/Assets/Art/Accessories/EarCurls/earCurls.mat


m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: EarCurls
m_Name: earCurls
m_Shader: {fileID: -6465566751694194690, guid: bf36778a400a0894b86a1f49c422fa62,
type: 3}
m_ShaderKeywords:

2
UOP1_Project/Assets/Art/Accessories/Moustache/moustache.mat


m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Moustache
m_Name: moustache
m_Shader: {fileID: -6465566751694194690, guid: c2f57d091fa8e17459a737c31526637b,
type: 3}
m_ShaderKeywords:

4
UOP1_Project/Assets/Localization Files/Asset Tables/Inventory/Inventory Item Action Shared Data.asset


m_Key: Cook
m_Metadata:
m_Items: []
- m_Id: 7281953546072064
m_Key: Eat
m_Metadata:
m_Items: []
m_Metadata:
m_Items: []
m_KeyGenerator:

4
UOP1_Project/Assets/Localization Files/Asset Tables/Inventory/Inventory Item Action_en.asset


m_Localized: Cook
m_Metadata:
m_Items: []
- m_Id: 7281953546072064
m_Localized: Eat
m_Metadata:
m_Items: []
references:
version: 1

4
UOP1_Project/Assets/Localization Files/Asset Tables/Inventory/Inventory Item Action_fr.asset


m_Localized: "Pr\xE9parer"
m_Metadata:
m_Items: []
- m_Id: 7281953546072064
m_Localized: Manger
m_Metadata:
m_Items: []
references:
version: 1

82
UOP1_Project/Assets/Prefabs/UI/InventoryScreen.prefab


m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchorMax: {x: 0, y: 0}
m_SizeDelta: {x: -17, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0, y: 1}
--- !u!222 &677869994
CanvasRenderer:

m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 20, y: 20}
m_Pivot: {x: 0.5, y: 0.5}

m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 15}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0, y: 1}
--- !u!114 &1980477770
MonoBehaviour:

SelectItemEvent: {fileID: 11400000, guid: 7d61f180d1f834f2ba553208130de3c2, type: 2}
ActionButtonClicked: {fileID: 11400000, guid: 9c96a79e2ffe84add980e399abf85618,
type: 2}
OnInteractionEndedEvent: {fileID: 11400000, guid: c499d87f35465124f8fb2751b150430d,
type: 2}
--- !u!1001 &26049570273333792
PrefabInstance:
m_ObjectHideFlags: 0

objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 8b138dd8c9fac4f9bbe1bac525c63a3c, type: 3}
--- !u!224 &5127849719113406291 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 5149096329462859123, guid: 8b138dd8c9fac4f9bbe1bac525c63a3c,
type: 3}
m_PrefabInstance: {fileID: 26049570273333792}
m_PrefabAsset: {fileID: 0}
--- !u!114 &7584548206858770602 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 7574264689645128330, guid: 8b138dd8c9fac4f9bbe1bac525c63a3c,

m_Script: {fileID: 11500000, guid: 93dbe2b925cf041d1bab6ad1cc9ef1c0, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!224 &5127849719113406291 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 5149096329462859123, guid: 8b138dd8c9fac4f9bbe1bac525c63a3c,
type: 3}
m_PrefabInstance: {fileID: 26049570273333792}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &1135095444294628428
PrefabInstance:
m_ObjectHideFlags: 0

objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 5871d3b5d4307434e9d7011de3208d9b, type: 3}
--- !u!224 &6041243878473060154 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 8641244786037450274, guid: 5871d3b5d4307434e9d7011de3208d9b,
type: 3}
m_PrefabInstance: {fileID: 2611262141660309784}
m_PrefabAsset: {fileID: 0}
--- !u!114 &31031661233432215 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 2617486611881742223, guid: 5871d3b5d4307434e9d7011de3208d9b,

m_Script: {fileID: 11500000, guid: 5b02f588ec7814c3895df91b3ba439a5, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!224 &6041243878473060154 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 8641244786037450274, guid: 5871d3b5d4307434e9d7011de3208d9b,
type: 3}
m_PrefabInstance: {fileID: 2611262141660309784}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &4927264552654137991
PrefabInstance:
m_ObjectHideFlags: 0

objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 8b138dd8c9fac4f9bbe1bac525c63a3c, type: 3}
--- !u!224 &221919747404738548 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 5149096329462859123, guid: 8b138dd8c9fac4f9bbe1bac525c63a3c,
type: 3}
m_PrefabInstance: {fileID: 4927264552654137991}
m_PrefabAsset: {fileID: 0}
--- !u!114 &3277521686480019469 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 7574264689645128330, guid: 8b138dd8c9fac4f9bbe1bac525c63a3c,

m_Script: {fileID: 11500000, guid: 93dbe2b925cf041d1bab6ad1cc9ef1c0, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!224 &221919747404738548 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 5149096329462859123, guid: 8b138dd8c9fac4f9bbe1bac525c63a3c,
type: 3}
m_PrefabInstance: {fileID: 4927264552654137991}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &5787777448482401271
PrefabInstance:
m_ObjectHideFlags: 0

objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 8b138dd8c9fac4f9bbe1bac525c63a3c, type: 3}
--- !u!224 &4288636597873103797 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 5149096329462859123, guid: 8b138dd8c9fac4f9bbe1bac525c63a3c,
type: 3}
m_PrefabInstance: {fileID: 9002994275147945670}
m_PrefabAsset: {fileID: 0}
--- !u!114 &1579705794856000588 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 7574264689645128330, guid: 8b138dd8c9fac4f9bbe1bac525c63a3c,

m_Script: {fileID: 11500000, guid: 93dbe2b925cf041d1bab6ad1cc9ef1c0, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!224 &4288636597873103797 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 5149096329462859123, guid: 8b138dd8c9fac4f9bbe1bac525c63a3c,
type: 3}
m_PrefabInstance: {fileID: 9002994275147945670}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &9125883717371129678
PrefabInstance:
m_ObjectHideFlags: 0

m_RemovedComponents:
- {fileID: 5074195970675175550, guid: b01383ebcda1049008a325f2ca7e6aca, type: 3}
m_SourcePrefab: {fileID: 100100000, guid: b01383ebcda1049008a325f2ca7e6aca, type: 3}
--- !u!114 &5854709384753378033 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 3451373362961513096, guid: b01383ebcda1049008a325f2ca7e6aca,
--- !u!224 &8947289629807390876 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 184241180236232933, guid: b01383ebcda1049008a325f2ca7e6aca,
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 56eb0353ae6e5124bb35b17aff880f16, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &1575787593498220194 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 7745052901829238491, guid: b01383ebcda1049008a325f2ca7e6aca,

m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!224 &8947289629807390876 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 184241180236232933, guid: b01383ebcda1049008a325f2ca7e6aca,
--- !u!114 &5854709384753378033 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 3451373362961513096, guid: b01383ebcda1049008a325f2ca7e6aca,
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 56eb0353ae6e5124bb35b17aff880f16, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1001 &9125883717816827348
PrefabInstance:
m_ObjectHideFlags: 0

150
UOP1_Project/Assets/Scenes/Examples/InteractionExample.unity


- target: {fileID: 2723178623857253410, guid: 7f3c311f1ca46334ab26b1adfc5be02f,
type: 3}
propertyPath: m_RootOrder
value: 20
value: 21
objectReference: {fileID: 0}
- target: {fileID: 2723178623857253410, guid: 7f3c311f1ca46334ab26b1adfc5be02f,
type: 3}

objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 7f3c311f1ca46334ab26b1adfc5be02f, type: 3}
--- !u!1001 &586258105
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 2126586097156616352, guid: 0f60adbc96570cb4e9898a0409956f1d,
type: 3}
propertyPath: m_LocalPosition.x
value: -3.75
objectReference: {fileID: 0}
- target: {fileID: 2126586097156616352, guid: 0f60adbc96570cb4e9898a0409956f1d,
type: 3}
propertyPath: m_LocalPosition.y
value: 0.52
objectReference: {fileID: 0}
- target: {fileID: 2126586097156616352, guid: 0f60adbc96570cb4e9898a0409956f1d,
type: 3}
propertyPath: m_LocalPosition.z
value: 0.04
objectReference: {fileID: 0}
- target: {fileID: 2126586097156616352, guid: 0f60adbc96570cb4e9898a0409956f1d,
type: 3}
propertyPath: m_LocalRotation.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: 2126586097156616352, guid: 0f60adbc96570cb4e9898a0409956f1d,
type: 3}
propertyPath: m_LocalRotation.y
value: 0.52569234
objectReference: {fileID: 0}
- target: {fileID: 2126586097156616352, guid: 0f60adbc96570cb4e9898a0409956f1d,
type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 2126586097156616352, guid: 0f60adbc96570cb4e9898a0409956f1d,
type: 3}
propertyPath: m_LocalRotation.w
value: 0.8506748
objectReference: {fileID: 0}
- target: {fileID: 2126586097156616352, guid: 0f60adbc96570cb4e9898a0409956f1d,
type: 3}
propertyPath: m_RootOrder
value: 23
objectReference: {fileID: 0}
- target: {fileID: 2126586097156616352, guid: 0f60adbc96570cb4e9898a0409956f1d,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2126586097156616352, guid: 0f60adbc96570cb4e9898a0409956f1d,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 63.430004
objectReference: {fileID: 0}
- target: {fileID: 2126586097156616352, guid: 0f60adbc96570cb4e9898a0409956f1d,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2126586097156616356, guid: 0f60adbc96570cb4e9898a0409956f1d,
type: 3}
propertyPath: currentItem
value:
objectReference: {fileID: 11400000, guid: 7a69da03abc7b42a080b2856abaab177,
type: 2}
- target: {fileID: 2126586097156616357, guid: 0f60adbc96570cb4e9898a0409956f1d,
type: 3}
propertyPath: m_Name
value: Collectible Item (2)
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 0f60adbc96570cb4e9898a0409956f1d, type: 3}
--- !u!1 &732355621
GameObject:
m_ObjectHideFlags: 0

m_Script: {fileID: 11500000, guid: ac0b09e7857660247b1477e93731de29, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1001 &970104544
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 2126586097156616352, guid: 0f60adbc96570cb4e9898a0409956f1d,
type: 3}
propertyPath: m_LocalPosition.x
value: -4.5260897
objectReference: {fileID: 0}
- target: {fileID: 2126586097156616352, guid: 0f60adbc96570cb4e9898a0409956f1d,
type: 3}
propertyPath: m_LocalPosition.y
value: 0.52
objectReference: {fileID: 0}
- target: {fileID: 2126586097156616352, guid: 0f60adbc96570cb4e9898a0409956f1d,
type: 3}
propertyPath: m_LocalPosition.z
value: -2.8973784
objectReference: {fileID: 0}
- target: {fileID: 2126586097156616352, guid: 0f60adbc96570cb4e9898a0409956f1d,
type: 3}
propertyPath: m_LocalRotation.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: 2126586097156616352, guid: 0f60adbc96570cb4e9898a0409956f1d,
type: 3}
propertyPath: m_LocalRotation.y
value: 0.52569234
objectReference: {fileID: 0}
- target: {fileID: 2126586097156616352, guid: 0f60adbc96570cb4e9898a0409956f1d,
type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 2126586097156616352, guid: 0f60adbc96570cb4e9898a0409956f1d,
type: 3}
propertyPath: m_LocalRotation.w
value: 0.8506748
objectReference: {fileID: 0}
- target: {fileID: 2126586097156616352, guid: 0f60adbc96570cb4e9898a0409956f1d,
type: 3}
propertyPath: m_RootOrder
value: 22
objectReference: {fileID: 0}
- target: {fileID: 2126586097156616352, guid: 0f60adbc96570cb4e9898a0409956f1d,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2126586097156616352, guid: 0f60adbc96570cb4e9898a0409956f1d,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 63.430004
objectReference: {fileID: 0}
- target: {fileID: 2126586097156616352, guid: 0f60adbc96570cb4e9898a0409956f1d,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2126586097156616357, guid: 0f60adbc96570cb4e9898a0409956f1d,
type: 3}
propertyPath: m_Name
value: Collectible Item (1)
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 0f60adbc96570cb4e9898a0409956f1d, type: 3}
--- !u!1 &998581018
GameObject:
m_ObjectHideFlags: 0

- target: {fileID: 2126586097156616352, guid: 0f60adbc96570cb4e9898a0409956f1d,
type: 3}
propertyPath: m_RootOrder
value: 21
value: 20
objectReference: {fileID: 0}
- target: {fileID: 2126586097156616352, guid: 0f60adbc96570cb4e9898a0409956f1d,
type: 3}

- target: {fileID: 2126586097156616357, guid: 0f60adbc96570cb4e9898a0409956f1d,
type: 3}
propertyPath: m_Name
value: Collectible Item (1)
value: 'Collectible Item '
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 0f60adbc96570cb4e9898a0409956f1d, type: 3}

120
UOP1_Project/Assets/Scenes/Gameplay.unity


m_Script: {fileID: 11500000, guid: 24b948a9bd4284c4ab2089bf06c7f20c, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &1517739790
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1517739792}
- component: {fileID: 1517739791}
m_Layer: 0
m_Name: InventoryManager
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1517739791
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1517739790}
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}
--- !u!4 &1517739792
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1517739790}
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!224 &1540519754 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 3687453176568796422, guid: 0ac9fcac72b964a9181545df5e543b03,

m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0, y: 0}
--- !u!1001 &1970466630767436857
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 1970466629595806505, guid: 9e5d964358f2bcc4db1c7e33aace9d8d,
type: 3}
propertyPath: m_LocalPosition.x
value: -0.475743
objectReference: {fileID: 0}
- target: {fileID: 1970466629595806505, guid: 9e5d964358f2bcc4db1c7e33aace9d8d,
type: 3}
propertyPath: m_LocalPosition.y
value: -10.206712
objectReference: {fileID: 0}
- target: {fileID: 1970466629595806505, guid: 9e5d964358f2bcc4db1c7e33aace9d8d,
type: 3}
propertyPath: m_LocalPosition.z
value: -4.8572383
objectReference: {fileID: 0}
- target: {fileID: 1970466629595806505, guid: 9e5d964358f2bcc4db1c7e33aace9d8d,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1970466629595806505, guid: 9e5d964358f2bcc4db1c7e33aace9d8d,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1970466629595806505, guid: 9e5d964358f2bcc4db1c7e33aace9d8d,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1970466629595806505, guid: 9e5d964358f2bcc4db1c7e33aace9d8d,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1970466629595806505, guid: 9e5d964358f2bcc4db1c7e33aace9d8d,
type: 3}
propertyPath: m_RootOrder
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1970466629595806505, guid: 9e5d964358f2bcc4db1c7e33aace9d8d,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1970466629595806505, guid: 9e5d964358f2bcc4db1c7e33aace9d8d,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1970466629595806505, guid: 9e5d964358f2bcc4db1c7e33aace9d8d,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1970466629595806519, guid: 9e5d964358f2bcc4db1c7e33aace9d8d,
type: 3}
propertyPath: m_Name
value: InventoryManager
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 9e5d964358f2bcc4db1c7e33aace9d8d, type: 3}
--- !u!1001 &3687453177731785292
PrefabInstance:
m_ObjectHideFlags: 0

- target: {fileID: 6822594373627009031, guid: 1d09c349511c34e2d8b16f139aadb731,
type: 3}
propertyPath: m_Name
value: Game Screen
value: InGameScreen
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 1d09c349511c34e2d8b16f139aadb731, type: 3}

2
UOP1_Project/Assets/ScriptableObjects/Inventory/ItemTypes/Dish.asset


m_TableReference:
m_TableCollectionName: GUID:0a8caeffc79914eb7ae64a269378d203
m_TableEntryReference:
m_KeyId: 9104777216
m_KeyId: 7281953546072064
m_Key:
_typeName:
m_TableReference:

4
UOP1_Project/Assets/Scripts/Inventory/InventoryManager.cs


{
for (int i = 0; i < ingredients.Count; i++)
{
if (ingredients[i].Item.ItemType.ActionType == ItemInventoryActionType.use)
if ((ingredients[i].Item.ItemType.ActionType == ItemInventoryActionType.use))
//add dish
currentInventory.Add(recipe.ResultingDish);
}

22
UOP1_Project/Assets/Scripts/Inventory/UIInventoryManager.cs


using System.Collections.Generic;
using UnityEngine;
public class InventoryFiller : MonoBehaviour
public class UIInventoryManager : MonoBehaviour
{
[SerializeField]
private Inventory currentInventory;

public VoidEventChannelSO ActionButtonClicked;
public VoidEventChannelSO OnInteractionEndedEvent;
private void OnEnable()
{
//Check if the event exists to avoid errors

{
SelectItemEvent.OnEventRaised += InspectItem;
}
if (OnInteractionEndedEvent != null)
{
OnInteractionEndedEvent.OnEventRaised += InteractionEnded;
}
}
private void OnDisable()

public void FillInventory(TabType _selectedTabType = TabType.none)
bool isNearPot = false;
public void FillInventory(TabType _selectedTabType = TabType.none, bool _isNearPot = false)
isNearPot = _isNearPot;
if ((_selectedTabType != TabType.none) && (tabTypesList.Exists(o => o.TabType == _selectedTabType)))
{

}
}
public void InteractionEnded()
{
isNearPot = false;
}
void FillTypeTabs(List<InventoryTabType> typesList, InventoryTabType selectedType)
{

bool isInteractable = true;
if (itemToInspect.ItemType.ActionType == ItemInventoryActionType.cook)
{
isInteractable = currentInventory.hasIngredients(itemToInspect.IngredientsList);
isInteractable = currentInventory.hasIngredients(itemToInspect.IngredientsList) && isNearPot
;
}
else if (itemToInspect.ItemType.ActionType == ItemInventoryActionType.doNothing)

8
UOP1_Project/Assets/Scripts/UI/UIManager.cs


}
[SerializeField]
DialogueUIController dialogueController = default;
UIDialogueManager dialogueController = default;
InventoryFiller inventoryPanel;
UIInventoryManager inventoryPanel;
UIInteractionPanelFiller interactionPanel;
UIInteractionManager interactionPanel;
public void OpenUIDialogue(DialogueLineSO dialogueLine)
{

if (isForCooking)
{
inventoryPanel.FillInventory(TabType.recipe);
inventoryPanel.FillInventory(TabType.recipe, true);
}
else

2
UOP1_Project/Assets/Scripts/UI/UIDialogueManager.cs


using UnityEngine;
using TMPro;
using UnityEngine.Localization.Components;
public class DialogueUIController : MonoBehaviour
public class UIDialogueManager : MonoBehaviour
{
[SerializeField] LocalizeStringEvent lineText = default;

3
UOP1_Project/Assets/Scripts/UI/UIInteractionItemFiller.cs


TextMeshProUGUI interactionKeyButton;
public void FillInteractionPanel(InteractionSO interactionItem) {
public void FillInteractionPanel(InteractionSO interactionItem)
{
interactionName.StringReference = interactionItem.InteractionName;
interactionKeyButton.text = KeyCode.E.ToString(); // this keycode will be modified later on

4
UOP1_Project/Assets/Scripts/UI/UIInteractionManager.cs


using System.Collections.Generic;
using UnityEngine;
public class UIInteractionPanelFiller : MonoBehaviour
public class UIInteractionManager : MonoBehaviour
{
[SerializeField]
private List<InteractionSO> listInteractions;

{
interactionItem.FillInteractionPanel(listInteractions.Find(o => o.InteractionType == interactionType));
}
}

8
UOP1_Project/Assets/Prefabs/Managers.meta


fileFormatVersion: 2
guid: db2af0e873d89ef4b8e56268a67d0980
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

51
UOP1_Project/Assets/Prefabs/Managers/InventoryManager.prefab


%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}

7
UOP1_Project/Assets/Prefabs/Managers/InventoryManager.prefab.meta


fileFormatVersion: 2
guid: 9e5d964358f2bcc4db1c7e33aace9d8d
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

18
UOP1_Project/Assets/Scripts/Inventory/InventoryController.cs


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);
}
}
}

11
UOP1_Project/Assets/Scripts/Inventory/InventoryController.cs.meta


fileFormatVersion: 2
guid: 9d977368908c08a4798b90a8757a255b
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

/UOP1_Project/Assets/Scripts/Inventory/InventoryFiller.cs.meta → /UOP1_Project/Assets/Scripts/Inventory/UIInventoryManager.cs.meta

/UOP1_Project/Assets/Scripts/Inventory/InventoryFiller.cs → /UOP1_Project/Assets/Scripts/Inventory/UIInventoryManager.cs

/UOP1_Project/Assets/Scripts/UI/DialogueUIController.cs.meta → /UOP1_Project/Assets/Scripts/UI/UIDialogueManager.cs.meta

/UOP1_Project/Assets/Scripts/UI/DialogueUIController.cs → /UOP1_Project/Assets/Scripts/UI/UIDialogueManager.cs

/UOP1_Project/Assets/Prefabs/UI/UIManager.prefab.meta → /UOP1_Project/Assets/Prefabs/Managers/UIManager.prefab.meta

/UOP1_Project/Assets/Prefabs/UI/UIManager.prefab → /UOP1_Project/Assets/Prefabs/Managers/UIManager.prefab

/UOP1_Project/Assets/UIInteractionItemFiller.cs → /UOP1_Project/Assets/Scripts/UI/UIInteractionItemFiller.cs

/UOP1_Project/Assets/UIInteractionItemFiller.cs.meta → /UOP1_Project/Assets/Scripts/UI/UIInteractionItemFiller.cs.meta

/UOP1_Project/Assets/UIInteractionPanelFiller.cs → /UOP1_Project/Assets/Scripts/UI/UIInteractionManager.cs

/UOP1_Project/Assets/UIInteractionPanelFiller.cs.meta → /UOP1_Project/Assets/Scripts/UI/UIInteractionManager.cs.meta

正在加载...
取消
保存