浏览代码

Merge with main and fix Selection bug

/main
uChema 4 年前
当前提交
be536522
共有 34 个文件被更改,包括 2716 次插入1780 次删除
  1. 13
      UOP1_Project/Assets/Prefabs/UI/ButtonChoice.prefab
  2. 13
      UOP1_Project/Assets/Prefabs/UI/ButtonMenu.prefab
  3. 32
      UOP1_Project/Assets/Prefabs/UI/Canvas-MainMenu.prefab
  4. 18
      UOP1_Project/Assets/Prefabs/UI/EventSystem.prefab
  5. 13
      UOP1_Project/Assets/Prefabs/UI/InventoryItem.prefab
  6. 13
      UOP1_Project/Assets/Prefabs/UI/Popup/PopupButton.prefab
  7. 13
      UOP1_Project/Assets/Prefabs/UI/UnpauseButton.prefab
  8. 481
      UOP1_Project/Assets/Prefabs/UI/WIP/Credits_Panel.prefab
  9. 172
      UOP1_Project/Assets/Prefabs/UI/WIP/Settings/Settings_Panel.prefab
  10. 40
      UOP1_Project/Assets/Scenes/Managers/Gameplay.unity
  11. 556
      UOP1_Project/Assets/Scenes/Menus/MainMenu.unity
  12. 2
      UOP1_Project/Assets/Scripts/.DS_Store
  13. 8
      UOP1_Project/Assets/Scripts/Events/ScriptableObjects/BoolEventChannelSO.cs
  14. 43
      UOP1_Project/Assets/Scripts/Gameplay/GameManager.cs
  15. 968
      UOP1_Project/Assets/Scripts/Input/GameInput.cs
  16. 76
      UOP1_Project/Assets/Scripts/Input/InputReader.cs
  17. 49
      UOP1_Project/Assets/Scripts/Inventory/UIInventoryManager.cs
  18. 22
      UOP1_Project/Assets/Scripts/Menu/MenuSelectionHandler.cs
  19. 1
      UOP1_Project/Assets/Scripts/Menu/MultiInputButton.cs
  20. 4
      UOP1_Project/Assets/Scripts/UI/UIManager.cs
  21. 18
      UOP1_Project/Assets/Scripts/UI/UIMenuManager.cs
  22. 24
      UOP1_Project/Assets/Scripts/UI/UISettingFieldsFiller.cs
  23. 4
      UOP1_Project/Assets/Scripts/UI/UISettingItemFiller.cs
  24. 10
      UOP1_Project/Assets/Scripts/UI/UISettingManager.cs
  25. 714
      UOP1_Project/Assets/Settings/Input/GameInput.inputactions
  26. 16
      UOP1_Project/UserSettings/EditorUserSettings.asset
  27. 8
      UOP1_Project/Assets/WIP/UI.meta
  28. 611
      UOP1_Project/Assets/WIP/UI/UIHealtDisplay.prefab
  29. 78
      UOP1_Project/Assets/WIP/UI/UIHealthBarManager.cs
  30. 394
      UOP1_Project/Assets/Prefabs/UI/WIP/UIHealthbar.prefab
  31. 82
      UOP1_Project/Assets/Scripts/UI/UIHealthBarManager.cs
  32. 0
      /UOP1_Project/Assets/WIP/UI/UIHealtDisplay.prefab.meta
  33. 0
      /UOP1_Project/Assets/WIP/UI/UIHealthBarManager.cs.meta

13
UOP1_Project/Assets/Prefabs/UI/ButtonChoice.prefab


- component: {fileID: 20254463}
- component: {fileID: 3600158999093101197}
- component: {fileID: 20254461}
- component: {fileID: 5530593642877575383}
m_Layer: 5
m_Name: ButtonToClick
m_TagString: Untagged

m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
--- !u!114 &5530593642877575383
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 20254459}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 83c0f9e51d2b4ff7bc0b46c5ed82b408, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &550526546634029911
GameObject:
m_ObjectHideFlags: 0

13
UOP1_Project/Assets/Prefabs/UI/ButtonMenu.prefab


- component: {fileID: 6506251815399143023}
- component: {fileID: 6506251815399143022}
- component: {fileID: 1494236524}
- component: {fileID: 8154979106902543178}
m_Layer: 5
m_Name: ButtonMenu
m_TagString: Untagged

m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
--- !u!114 &8154979106902543178
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6506251815399143020}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 83c0f9e51d2b4ff7bc0b46c5ed82b408, type: 3}
m_Name:
m_EditorClassIdentifier:

32
UOP1_Project/Assets/Prefabs/UI/Canvas-MainMenu.prefab


- component: {fileID: 31749702957475743}
- component: {fileID: 31749702957475736}
- component: {fileID: 381379602}
- component: {fileID: 8312508109763636281}
m_Layer: 5
m_Name: Canvas-MainMenu
m_TagString: Untagged

_startNewGameEvent: {fileID: 11400000, guid: 2d8265bc91f6244e49560195fe2ca5e9, type: 2}
_continueGameEvent: {fileID: 11400000, guid: c6438460769bc46b7a96bd3c7233a68a, type: 2}
_closePopupEvent: {fileID: 11400000, guid: 849b97e2c22a94f13b2c9870145abc4c, type: 2}
_closeSettingsEvent: {fileID: 0}
_closeCreditsEvent: {fileID: 0}
_closeSettingsEvent: {fileID: 11400000, guid: c42d49d01efc749a9a5326b51dcc32af,
type: 2}
_closeCreditsEvent: {fileID: 11400000, guid: e254a2d838f7f4c869b9b8ddf049f4b4, type: 2}
--- !u!114 &8312508109763636281
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 31749702957475737}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: af38c0740d43a4f419a21ea970c9cf53, type: 3}
m_Name:
m_EditorClassIdentifier:
_inputReader: {fileID: 11400000, guid: 945ec0365077176418488737deed54be, type: 2}
_defaultSelection: {fileID: 0}
currentSelection: {fileID: 0}
mouseSelection: {fileID: 0}
--- !u!1 &31749703055482844
GameObject:
m_ObjectHideFlags: 0

m_Modification:
m_TransformParent: {fileID: 31749702957475741}
m_Modifications:
- target: {fileID: 1247507422823214019, guid: d04aa2fb2a8564a6eadbda82be8b64ee,
type: 3}
propertyPath: _settingfieldsList.Array.size
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1847093150474249088, guid: d04aa2fb2a8564a6eadbda82be8b64ee,
type: 3}
propertyPath: m_AnchorMax.y

type: 3}
propertyPath: m_Name
value: Credits_Panel
objectReference: {fileID: 0}
- target: {fileID: 8357250151446615845, guid: 94ca6d0c15c4b4a2cbbe4758a17b8dfb,
type: 3}
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8357250151446615846, guid: 94ca6d0c15c4b4a2cbbe4758a17b8dfb,
type: 3}

18
UOP1_Project/Assets/Prefabs/UI/EventSystem.prefab


m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4398103872695503860}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []

m_MoveRepeatRate: 0.1
m_ActionsAsset: {fileID: -944628639613478452, guid: 47a7bd10b734b954e95d4dbf166f5578,
type: 3}
m_PointAction: {fileID: 8983739092998002524, guid: 47a7bd10b734b954e95d4dbf166f5578,
m_PointAction: {fileID: 4657195613605186234, guid: 47a7bd10b734b954e95d4dbf166f5578,
m_MoveAction: {fileID: -5015529238018045667, guid: 47a7bd10b734b954e95d4dbf166f5578,
m_MoveAction: {fileID: -6051538590082338457, guid: 47a7bd10b734b954e95d4dbf166f5578,
m_SubmitAction: {fileID: 1297298476127457995, guid: 47a7bd10b734b954e95d4dbf166f5578,
m_SubmitAction: {fileID: -1876787423063650946, guid: 47a7bd10b734b954e95d4dbf166f5578,
m_LeftClickAction: {fileID: -2552781003718252773, guid: 47a7bd10b734b954e95d4dbf166f5578,
type: 3}
m_MiddleClickAction: {fileID: -213735815785642246, guid: 47a7bd10b734b954e95d4dbf166f5578,
type: 3}
m_RightClickAction: {fileID: 6035800505033691578, guid: 47a7bd10b734b954e95d4dbf166f5578,
m_LeftClickAction: {fileID: 8159624000241312163, guid: 47a7bd10b734b954e95d4dbf166f5578,
m_ScrollWheelAction: {fileID: -4027076021969493668, guid: 47a7bd10b734b954e95d4dbf166f5578,
m_MiddleClickAction: {fileID: 0}
m_RightClickAction: {fileID: -4250891401435834712, guid: 47a7bd10b734b954e95d4dbf166f5578,
m_ScrollWheelAction: {fileID: 0}
m_TrackedDevicePositionAction: {fileID: 6274226678584773153, guid: 47a7bd10b734b954e95d4dbf166f5578,
type: 3}
m_TrackedDeviceOrientationAction: {fileID: 7786481880100805553, guid: 47a7bd10b734b954e95d4dbf166f5578,

13
UOP1_Project/Assets/Prefabs/UI/InventoryItem.prefab


- component: {fileID: 1985079889}
- component: {fileID: 1985079888}
- component: {fileID: 8120753495735798410}
- component: {fileID: 1707667028286314568}
m_Layer: 5
m_Name: ButtonItem
m_TagString: Untagged

m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
--- !u!114 &1707667028286314568
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1985079886}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 83c0f9e51d2b4ff7bc0b46c5ed82b408, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &2019030444
GameObject:
m_ObjectHideFlags: 0

13
UOP1_Project/Assets/Prefabs/UI/Popup/PopupButton.prefab


- component: {fileID: 252969180845692040}
- component: {fileID: 3635794304859248890}
- component: {fileID: 252969180845692042}
- component: {fileID: 6602095586343775202}
m_Layer: 5
m_Name: ButtonToClick
m_TagString: Untagged

m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
--- !u!114 &6602095586343775202
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 252969180845692044}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 83c0f9e51d2b4ff7bc0b46c5ed82b408, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &297632141197697312
GameObject:
m_ObjectHideFlags: 0

13
UOP1_Project/Assets/Prefabs/UI/UnpauseButton.prefab


- component: {fileID: 4513302106742259859}
- component: {fileID: 1104558195131469025}
- component: {fileID: 4513302106742259857}
- component: {fileID: 2680095201307940933}
m_Layer: 5
m_Name: ButtonToClick
m_TagString: Untagged

m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
--- !u!114 &2680095201307940933
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4513302106742259863}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 83c0f9e51d2b4ff7bc0b46c5ed82b408, type: 3}
m_Name:
m_EditorClassIdentifier:

481
UOP1_Project/Assets/Prefabs/UI/WIP/Credits_Panel.prefab


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &2827719573730425848
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7964436592886051774}
- component: {fileID: 1472125080626815416}
- component: {fileID: 6557325583934902717}
m_Layer: 5
m_Name: Image
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &7964436592886051774
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2827719573730425848}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 4006092436564400233}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.2, y: 0.2}
m_AnchorMax: {x: 0.8, y: 0.8}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &1472125080626815416
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2827719573730425848}
m_CullTransparentMesh: 0
--- !u!114 &6557325583934902717
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2827719573730425848}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.9622642, g: 0.73985404, b: 0.73985404, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: adb9869bd647c4e50b465fc97a027dcd, type: 3}
m_Type: 0
m_PreserveAspect: 1
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!1 &3947497340452779878
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7323042986682313011}
- component: {fileID: 7835769505816339375}
- component: {fileID: 8116466945051902073}
m_Layer: 5
m_Name: NB
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &7323042986682313011
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3947497340452779878}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1.0009267, y: 1.0009267, z: 1.0009267}
m_Children: []
m_Father: {fileID: 8357250151446615846}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 1, y: 0}
m_AnchorMax: {x: 1, y: 0}
m_AnchoredPosition: {x: -10, y: 10}
m_SizeDelta: {x: 300, y: 51}
m_Pivot: {x: 1, y: 0}
--- !u!222 &7835769505816339375
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3947497340452779878}
m_CullTransparentMesh: 1
--- !u!114 &8116466945051902073
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3947497340452779878}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: '!! Work in progress !!'
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4278190335
m_fontColor: {r: 1, g: 0, b: 0, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 27.35
m_fontSizeBase: 70
m_fontWeight: 400
m_enableAutoSizing: 1
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 1
m_HorizontalAlignment: 1
m_VerticalAlignment: 256
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!1 &8357250150811881581
GameObject:
m_ObjectHideFlags: 0

m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
m_IsActive: 1
--- !u!224 &8357250151446615846
RectTransform:
m_ObjectHideFlags: 0

m_Children:
- {fileID: 8357250150811881582}
- {fileID: 8357250151146825050}
- {fileID: 4006092436564400233}
- {fileID: 7323042986682313011}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}

m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!1001 &3825510706580971660
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 8357250151446615846}
m_Modifications:
- target: {fileID: 184241180236232933, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_Pivot.x
value: 1
objectReference: {fileID: 0}
- target: {fileID: 184241180236232933, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_Pivot.y
value: 0.6060664
objectReference: {fileID: 0}
- target: {fileID: 184241180236232933, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_RootOrder
value: 2
objectReference: {fileID: 0}
- target: {fileID: 184241180236232933, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_AnchorMax.x
value: 1
objectReference: {fileID: 0}
- target: {fileID: 184241180236232933, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_AnchorMax.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 184241180236232933, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_AnchorMin.x
value: 1
objectReference: {fileID: 0}
- target: {fileID: 184241180236232933, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_AnchorMin.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 184241180236232933, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_SizeDelta.x
value: 65.522484
objectReference: {fileID: 0}
- target: {fileID: 184241180236232933, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_SizeDelta.y
value: 64.98442
objectReference: {fileID: 0}
- target: {fileID: 184241180236232933, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_LocalScale.x
value: 1.0009267
objectReference: {fileID: 0}
- target: {fileID: 184241180236232933, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_LocalScale.y
value: 1.0009267
objectReference: {fileID: 0}
- target: {fileID: 184241180236232933, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_LocalScale.z
value: 1.0009267
objectReference: {fileID: 0}
- target: {fileID: 184241180236232933, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 184241180236232933, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 184241180236232933, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 184241180236232933, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 184241180236232933, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_LocalRotation.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: 184241180236232933, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: 184241180236232933, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 184241180236232933, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_AnchoredPosition.x
value: -51.24756
objectReference: {fileID: 0}
- target: {fileID: 184241180236232933, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_AnchoredPosition.y
value: -39.536743
objectReference: {fileID: 0}
- target: {fileID: 184241180236232933, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 184241180236232933, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 184241180236232933, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 657795093660955452, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_Name
value: Button Close
objectReference: {fileID: 0}
- target: {fileID: 657795093660955452, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5795051186182416585, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_text
value: X
objectReference: {fileID: 0}
- target: {fileID: 5795051186182416585, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_fontAsset
value:
objectReference: {fileID: 11400000, guid: fe129390af88b40faa85c89db6820ea6,
type: 2}
- target: {fileID: 5795051186182416585, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_fontStyle
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5795051186182416585, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_fontColor.b
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5795051186182416585, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_fontColor.g
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5795051186182416585, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_fontColor.r
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5795051186182416585, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_sharedMaterial
value:
objectReference: {fileID: 0}
- target: {fileID: 5795051186182416585, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_fontColor32.rgba
value: 4294967295
objectReference: {fileID: 0}
- target: {fileID: 5795051186182416585, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_hasFontAssetChanged
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6063084967698345726, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6880293173517029546, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_Type
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6880293173517029546, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_Sprite
value:
objectReference: {fileID: 21300000, guid: 552c608eb20bd4c5781d8232dfa30669,
type: 3}
- target: {fileID: 6880293173517029546, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_Color.b
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6880293173517029546, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_Color.g
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6880293173517029546, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_Color.r
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6880293173517029546, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_PreserveAspect
value: 1
objectReference: {fileID: 0}
- target: {fileID: 7745052901829238491, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_Navigation.m_Mode
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7745052901829238491, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.size
value: 1
objectReference: {fileID: 0}
- target: {fileID: 7745052901829238491, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Mode
value: 1
objectReference: {fileID: 0}
- target: {fileID: 7745052901829238491, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target
value:
objectReference: {fileID: 11400000, guid: e254a2d838f7f4c869b9b8ddf049f4b4,
type: 2}
- target: {fileID: 7745052901829238491, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_CallState
value: 2
objectReference: {fileID: 0}
- target: {fileID: 7745052901829238491, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName
value: RaiseEvent
objectReference: {fileID: 0}
- target: {fileID: 7745052901829238491, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_TargetAssemblyTypeName
value: VoidEventChannelSO, Assembly-CSharp
objectReference: {fileID: 0}
- target: {fileID: 7745052901829238491, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgumentAssemblyTypeName
value: UnityEngine.Object, UnityEngine
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: b01383ebcda1049008a325f2ca7e6aca, type: 3}
--- !u!224 &4006092436564400233 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 184241180236232933, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
m_PrefabInstance: {fileID: 3825510706580971660}
m_PrefabAsset: {fileID: 0}

172
UOP1_Project/Assets/Prefabs/UI/WIP/Settings/Settings_Panel.prefab


- {fileID: 5410022946495558774}
- {fileID: 5410022946837221017}
- {fileID: 5410022946556406609}
_inputReader: {fileID: 0}
--- !u!1 &1847093151536612366
GameObject:
m_ObjectHideFlags: 0

- {fileID: 1847093151536612367}
- {fileID: 1847093151243874148}
- {fileID: 3579478411799882482}
- {fileID: 5939887162693290819}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}

m_Key:
m_FallbackState: 0
_settingFieldsFiller: {fileID: 1247507422823214019}
--- !u!1 &3622180757932086533
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5939887162693290819}
- component: {fileID: 4971813508920852396}
- component: {fileID: 5746994250731585786}
m_Layer: 5
m_Name: NB
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &5939887162693290819
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3622180757932086533}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 1847093151952770123}
m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 1, y: 0}
m_AnchorMax: {x: 1, y: 0}
m_AnchoredPosition: {x: -10, y: 10}
m_SizeDelta: {x: 300, y: 51}
m_Pivot: {x: 1, y: 0}
--- !u!222 &4971813508920852396
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3622180757932086533}
m_CullTransparentMesh: 1
--- !u!114 &5746994250731585786
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3622180757932086533}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: '!! Work in progress !!'
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4278190335
m_fontColor: {r: 1, g: 0, b: 0, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 27.35
m_fontSizeBase: 70
m_fontWeight: 400
m_enableAutoSizing: 1
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 1
m_HorizontalAlignment: 1
m_VerticalAlignment: 256
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!1001 &1847093150184515968
PrefabInstance:
m_ObjectHideFlags: 0

objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: bfbbc6fd7e74c4e288fdadc2265eef46, type: 3}
--- !u!224 &8679344159429692678 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 7048424685039854726, guid: bfbbc6fd7e74c4e288fdadc2265eef46,
type: 3}
m_PrefabInstance: {fileID: 1847093150184515968}
m_PrefabAsset: {fileID: 0}
--- !u!114 &5410022946556406609 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 5960076895796773585, guid: bfbbc6fd7e74c4e288fdadc2265eef46,

m_Script: {fileID: 11500000, guid: 02a6bc9a95af04bb2824645c3268e511, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!224 &8679344159429692678 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 7048424685039854726, guid: bfbbc6fd7e74c4e288fdadc2265eef46,
type: 3}
m_PrefabInstance: {fileID: 1847093150184515968}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &1847093150245369511
PrefabInstance:
m_ObjectHideFlags: 0

objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: bfbbc6fd7e74c4e288fdadc2265eef46, type: 3}
--- !u!224 &8679344160253688302 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 7048424685039854726, guid: bfbbc6fd7e74c4e288fdadc2265eef46,
type: 3}
m_PrefabInstance: {fileID: 1847093152044621160}
m_PrefabAsset: {fileID: 0}
--- !u!114 &5410022945770168249 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 5960076895796773585, guid: bfbbc6fd7e74c4e288fdadc2265eef46,

m_Script: {fileID: 11500000, guid: 02a6bc9a95af04bb2824645c3268e511, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!224 &8679344160253688302 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 7048424685039854726, guid: bfbbc6fd7e74c4e288fdadc2265eef46,
type: 3}
m_PrefabInstance: {fileID: 1847093152044621160}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &3684598455574483479
PrefabInstance:
m_ObjectHideFlags: 0

objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: f972fe86e7dcf4b0e911528970aea6c4, type: 3}
--- !u!224 &1847093151080956945 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 9115052875433558163, guid: f972fe86e7dcf4b0e911528970aea6c4,
type: 3}
m_PrefabInstance: {fileID: 7484170199103571074}
m_PrefabAsset: {fileID: 0}
--- !u!114 &8768572485288441033 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 2192451556169986123, guid: f972fe86e7dcf4b0e911528970aea6c4,

m_Script: {fileID: 11500000, guid: fa7c15a36589a494d85b3f722cd0eeb0, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!224 &1847093151080956945 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 9115052875433558163, guid: f972fe86e7dcf4b0e911528970aea6c4,
type: 3}
m_PrefabInstance: {fileID: 7484170199103571074}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &8679344159744984838
PrefabInstance:
m_ObjectHideFlags: 0

40
UOP1_Project/Assets/Scenes/Managers/Gameplay.unity


- component: {fileID: 1869732380}
- component: {fileID: 1869732379}
- component: {fileID: 1869732378}
- component: {fileID: 1869732382}
m_Layer: 5
m_Name: Canvas
m_TagString: Untagged

m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0, y: 0}
--- !u!114 &1869732382
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1869732377}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: af38c0740d43a4f419a21ea970c9cf53, type: 3}
m_Name:
m_EditorClassIdentifier:
_inputReader: {fileID: 11400000, guid: 945ec0365077176418488737deed54be, type: 2}
_defaultSelection: {fileID: 0}
currentSelection: {fileID: 0}
mouseSelection: {fileID: 0}
--- !u!1001 &1395789391981611399
PrefabInstance:
m_ObjectHideFlags: 0

propertyPath: _pauseScreen
value:
objectReference: {fileID: 4949818870599756129}
- target: {fileID: 8313085416397863411, guid: 2af68f4e6b94140cfbcdee05fcc28ce3,
type: 3}
propertyPath: _setHealthBar
value:
objectReference: {fileID: 11400000, guid: 22e3f27f002de44b4948988138dd9377,
type: 2}
- target: {fileID: 8313085416397863411, guid: 2af68f4e6b94140cfbcdee05fcc28ce3,
type: 3}
propertyPath: _healthDisplay
value:
objectReference: {fileID: 0}
- target: {fileID: 8313085416397863411, guid: 2af68f4e6b94140cfbcdee05fcc28ce3,
type: 3}
propertyPath: _inflictDamage
value:
objectReference: {fileID: 11400000, guid: be921b398c68d450e9e3c55dde697149,
type: 2}
- target: {fileID: 8313085416397863411, guid: 2af68f4e6b94140cfbcdee05fcc28ce3,
type: 3}
propertyPath: _restoreHealth
value:
objectReference: {fileID: 11400000, guid: de4a39f85969d44cba990125224ff7ef,
type: 2}
- target: {fileID: 8313085416397863411, guid: 2af68f4e6b94140cfbcdee05fcc28ce3,
type: 3}
propertyPath: _settingScreen

556
UOP1_Project/Assets/Scenes/Menus/MainMenu.unity


m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 381379602, guid: 88498729c08b74b588c91db70fc55665, type: 3}
propertyPath: _closeCreditsEvent
value:
objectReference: {fileID: 11400000, guid: e254a2d838f7f4c869b9b8ddf049f4b4,
type: 2}
- target: {fileID: 381379602, guid: 88498729c08b74b588c91db70fc55665, type: 3}
propertyPath: _closeSettingsEvent
value:
objectReference: {fileID: 11400000, guid: c42d49d01efc749a9a5326b51dcc32af,
type: 2}
- target: {fileID: 892254965, guid: 88498729c08b74b588c91db70fc55665, type: 3}
propertyPath: m_IsActive
value: 0

propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1610677297365239011, guid: 88498729c08b74b588c91db70fc55665,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1610677297365239011, guid: 88498729c08b74b588c91db70fc55665,
type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1847093150164366843, guid: 88498729c08b74b588c91db70fc55665,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 0.00012207031
objectReference: {fileID: 0}
value: 1
value: 0
value: 1
value: 0
value: 100
value: 0
value: 153.60635
value: 0
value: -50
value: 0
value: 1
value: 0
value: 1
value: 0
value: 1122.9397
value: 1123.475
value: 561.46985
value: 561.7375
value: -41.65665
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5162818538747690425, guid: 88498729c08b74b588c91db70fc55665,
type: 3}

- target: {fileID: 5162818538747690425, guid: 88498729c08b74b588c91db70fc55665,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5939887162078374643, guid: 88498729c08b74b588c91db70fc55665,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6501532797693414060, guid: 88498729c08b74b588c91db70fc55665,

- target: {fileID: 7484170199785075497, guid: 88498729c08b74b588c91db70fc55665,
type: 3}
propertyPath: m_AnchorMax.y
value: 1
value: 0
value: 1
value: 0
value: 100
value: 0
value: 788.03174
value: 0
value: -50
value: 0
value: 1
value: 0
value: 1
value: 0
value: 100
value: 0
value: 470.81906
value: 0
value: -50
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8679344159609395294, guid: 88498729c08b74b588c91db70fc55665,
type: 3}
propertyPath: m_AnchorMax.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8679344159609395294, guid: 88498729c08b74b588c91db70fc55665,
type: 3}
propertyPath: m_AnchorMin.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8679344159609395294, guid: 88498729c08b74b588c91db70fc55665,
type: 3}
propertyPath: m_SizeDelta.x
value: 1123.475
objectReference: {fileID: 0}
- target: {fileID: 8679344159609395294, guid: 88498729c08b74b588c91db70fc55665,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 561.7375
objectReference: {fileID: 0}
- target: {fileID: 8679344159609395294, guid: 88498729c08b74b588c91db70fc55665,
type: 3}
propertyPath: m_AnchoredPosition.y
value: -248.28325
objectReference: {fileID: 0}
- target: {fileID: 8679344159971741719, guid: 88498729c08b74b588c91db70fc55665,
type: 3}
propertyPath: m_AnchorMax.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8679344159971741719, guid: 88498729c08b74b588c91db70fc55665,
type: 3}
propertyPath: m_AnchorMin.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8679344159971741719, guid: 88498729c08b74b588c91db70fc55665,
type: 3}
propertyPath: m_SizeDelta.x
value: 1123.475
objectReference: {fileID: 0}
- target: {fileID: 8679344159971741719, guid: 88498729c08b74b588c91db70fc55665,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 561.7375
objectReference: {fileID: 0}
- target: {fileID: 8679344159971741719, guid: 88498729c08b74b588c91db70fc55665,
type: 3}
propertyPath: m_AnchoredPosition.y
value: -144.96996
objectReference: {fileID: 0}
- target: {fileID: 8679344160351892369, guid: 88498729c08b74b588c91db70fc55665,
type: 3}
propertyPath: m_AnchorMax.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8679344160351892369, guid: 88498729c08b74b588c91db70fc55665,
type: 3}
propertyPath: m_AnchorMin.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8679344160351892369, guid: 88498729c08b74b588c91db70fc55665,
type: 3}
propertyPath: m_SizeDelta.x
value: 1123.475
objectReference: {fileID: 0}
- target: {fileID: 8679344160351892369, guid: 88498729c08b74b588c91db70fc55665,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 561.7375
objectReference: {fileID: 0}
- target: {fileID: 8679344160351892369, guid: 88498729c08b74b588c91db70fc55665,
type: 3}
propertyPath: m_AnchoredPosition.y
value: -351.59656
objectReference: {fileID: 0}
- target: {fileID: 8679344160425258166, guid: 88498729c08b74b588c91db70fc55665,
type: 3}
propertyPath: m_AnchorMax.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8679344160425258166, guid: 88498729c08b74b588c91db70fc55665,
type: 3}
propertyPath: m_AnchorMin.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8679344160425258166, guid: 88498729c08b74b588c91db70fc55665,
type: 3}
propertyPath: m_SizeDelta.x
value: 1123.475
objectReference: {fileID: 0}
- target: {fileID: 8679344160425258166, guid: 88498729c08b74b588c91db70fc55665,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 561.7375
objectReference: {fileID: 0}
- target: {fileID: 8679344160425258166, guid: 88498729c08b74b588c91db70fc55665,
type: 3}
propertyPath: m_AnchoredPosition.y
value: -558.2232
objectReference: {fileID: 0}
- target: {fileID: 8679344160689817982, guid: 88498729c08b74b588c91db70fc55665,
type: 3}
propertyPath: m_AnchorMax.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8679344160689817982, guid: 88498729c08b74b588c91db70fc55665,
type: 3}
propertyPath: m_AnchorMin.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8679344160689817982, guid: 88498729c08b74b588c91db70fc55665,
type: 3}
propertyPath: m_SizeDelta.x
value: 1123.475
objectReference: {fileID: 0}
- target: {fileID: 8679344160689817982, guid: 88498729c08b74b588c91db70fc55665,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 561.7375
objectReference: {fileID: 0}
- target: {fileID: 8679344160689817982, guid: 88498729c08b74b588c91db70fc55665,
type: 3}
propertyPath: m_AnchoredPosition.y
value: -454.90985
--- !u!224 &381379599 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 892254966, guid: 88498729c08b74b588c91db70fc55665,
--- !u!1 &1304619404 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 90523872167386449, guid: 88498729c08b74b588c91db70fc55665,
--- !u!114 &1304619408
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1304619404}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 83c0f9e51d2b4ff7bc0b46c5ed82b408, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &1419319618
GameObject:
m_ObjectHideFlags: 0

m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1419319618}
m_Enabled: 1
--- !u!1 &1689229997
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1689229998}
- component: {fileID: 1689230000}
- component: {fileID: 1689229999}
m_Layer: 5
m_Name: Image
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1689229998
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1689229997}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 1917222511}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.2, y: 0.2}
m_AnchorMax: {x: 0.8, y: 0.8}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1689229999
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1689229997}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.9622642, g: 0.73985404, b: 0.73985404, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: adb9869bd647c4e50b465fc97a027dcd, type: 3}
m_Type: 0
m_PreserveAspect: 1
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!222 &1689230000
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1689229997}
m_CullTransparentMesh: 0
--- !u!1001 &1917222510
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 381379599}
m_Modifications:
- target: {fileID: 184241180236232933, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_Pivot.x
value: 1
objectReference: {fileID: 0}
- target: {fileID: 184241180236232933, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_Pivot.y
value: 0.6060664
objectReference: {fileID: 0}
- target: {fileID: 184241180236232933, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_RootOrder
value: 2
objectReference: {fileID: 0}
- target: {fileID: 184241180236232933, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_AnchorMax.x
value: 1
objectReference: {fileID: 0}
- target: {fileID: 184241180236232933, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_AnchorMax.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 184241180236232933, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_AnchorMin.x
value: 1
objectReference: {fileID: 0}
- target: {fileID: 184241180236232933, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_AnchorMin.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 184241180236232933, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_SizeDelta.x
value: 65.522484
objectReference: {fileID: 0}
- target: {fileID: 184241180236232933, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_SizeDelta.y
value: 64.98442
objectReference: {fileID: 0}
- target: {fileID: 184241180236232933, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_LocalScale.x
value: 1.0009267
objectReference: {fileID: 0}
- target: {fileID: 184241180236232933, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_LocalScale.y
value: 1.0009267
objectReference: {fileID: 0}
- target: {fileID: 184241180236232933, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_LocalScale.z
value: 1.0009267
objectReference: {fileID: 0}
- target: {fileID: 184241180236232933, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 184241180236232933, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 184241180236232933, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 184241180236232933, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 184241180236232933, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_LocalRotation.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: 184241180236232933, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: 184241180236232933, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 184241180236232933, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_AnchoredPosition.x
value: -51.247593
objectReference: {fileID: 0}
- target: {fileID: 184241180236232933, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_AnchoredPosition.y
value: -39.536682
objectReference: {fileID: 0}
- target: {fileID: 184241180236232933, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 184241180236232933, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 184241180236232933, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 657795093660955452, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_Name
value: Button Close
objectReference: {fileID: 0}
- target: {fileID: 657795093660955452, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5795051186182416585, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_text
value: X
objectReference: {fileID: 0}
- target: {fileID: 5795051186182416585, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_fontAsset
value:
objectReference: {fileID: 11400000, guid: fe129390af88b40faa85c89db6820ea6,
type: 2}
- target: {fileID: 5795051186182416585, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_fontStyle
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5795051186182416585, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_fontColor.b
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5795051186182416585, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_fontColor.g
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5795051186182416585, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_fontColor.r
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5795051186182416585, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_sharedMaterial
value:
objectReference: {fileID: 0}
- target: {fileID: 5795051186182416585, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_fontColor32.rgba
value: 4294967295
objectReference: {fileID: 0}
- target: {fileID: 5795051186182416585, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_hasFontAssetChanged
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6063084967698345726, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6880293173517029546, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_Type
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6880293173517029546, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_Sprite
value:
objectReference: {fileID: 21300000, guid: 552c608eb20bd4c5781d8232dfa30669,
type: 3}
- target: {fileID: 6880293173517029546, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_Color.b
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6880293173517029546, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_Color.g
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6880293173517029546, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_Color.r
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6880293173517029546, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_PreserveAspect
value: 1
objectReference: {fileID: 0}
- target: {fileID: 7745052901829238491, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_Navigation.m_Mode
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7745052901829238491, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.size
value: 1
objectReference: {fileID: 0}
- target: {fileID: 7745052901829238491, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Mode
value: 1
objectReference: {fileID: 0}
- target: {fileID: 7745052901829238491, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target
value:
objectReference: {fileID: 11400000, guid: e254a2d838f7f4c869b9b8ddf049f4b4,
type: 2}
- target: {fileID: 7745052901829238491, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_CallState
value: 2
objectReference: {fileID: 0}
- target: {fileID: 7745052901829238491, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName
value: RaiseEvent
objectReference: {fileID: 0}
- target: {fileID: 7745052901829238491, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_TargetAssemblyTypeName
value: VoidEventChannelSO, Assembly-CSharp
objectReference: {fileID: 0}
- target: {fileID: 7745052901829238491, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgumentAssemblyTypeName
value: UnityEngine.Object, UnityEngine
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: b01383ebcda1049008a325f2ca7e6aca, type: 3}
--- !u!224 &1917222511 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 184241180236232933, guid: b01383ebcda1049008a325f2ca7e6aca,
type: 3}
m_PrefabInstance: {fileID: 1917222510}
m_PrefabAsset: {fileID: 0}

2
UOP1_Project/Assets/Scripts/.DS_Store
文件差异内容过多而无法显示
查看文件

8
UOP1_Project/Assets/Scripts/Events/ScriptableObjects/BoolEventChannelSO.cs


public void UnsubscribeAll()
{
if (OnEventRaised != null)
{if (OnEventRaised.GetInvocationList() != null)
{
if (OnEventRaised.GetInvocationList() != null)
foreach (System.Delegate d in OnEventRaised.GetInvocationList())
{

}
else
{
Debug.Log("WHAT IS THIS and why is it null ");
}
}
}

43
UOP1_Project/Assets/Scripts/Gameplay/GameManager.cs


public class GameManager : MonoBehaviour
{
[SerializeField]
private QuestManagerSO _questManager = default;
[SerializeField]
private QuestManagerSO _questManager = default;
[SerializeField]
private GameStateSO _gameState = default;
[SerializeField]
private InputReader _inputReader = default;
private void Start()
{
StartGame();
[SerializeField]
private GameStateSO _gameState = default;
// [SerializeField]
// private InputReader _inputReader = default;
_inputReader.pauseEvent += PauseGame;
private void Start()
{
StartGame();
}
}
{
_gameState.UpdateGameState(GameState.Gameplay);
_questManager.StartGame();
}
public void PauseGame()
_gameState.UpdateGameState(GameState.Gameplay);
_questManager.StartGame();
}
public void PauseGame()
{
_gameState.UpdateGameState(GameState.Pause);
}
public void UnauseGame()
{
_gameState.ResetToPreviousGameState();
}
}
public void UnpauseGame()
{
_gameState.ResetToPreviousGameState();
}
}

968
UOP1_Project/Assets/Scripts/Input/GameInput.cs
文件差异内容过多而无法显示
查看文件

76
UOP1_Project/Assets/Scripts/Input/InputReader.cs


using UnityEngine;
using UnityEngine.InputSystem;
using UnityEngine.Events;
using System;
[CreateAssetMenu(fileName = "InputReader", menuName = "Game/Input Reader")]
public class InputReader : ScriptableObject, GameInput.IGameplayActions, GameInput.IDialoguesActions, GameInput.IMenusActions

public event UnityAction attackEvent = delegate { };
public event UnityAction attackCanceledEvent = delegate { };
public event UnityAction interactEvent = delegate { }; // Used to talk, pickup objects, interact with tools like the cooking cauldron
public event UnityAction openInventoryEvent = delegate { }; // Used to bring up the inventory
public event UnityAction closeInventoryEvent = delegate { };// Used to bring up the inventory
public event UnityAction pauseEvent = delegate { };
public event UnityAction<Vector2> moveEvent = delegate { };
public event UnityAction<Vector2, bool> cameraMoveEvent = delegate { };
public event UnityAction enableMouseControlCameraEvent = delegate { };

// Menus
public event UnityAction menuMouseMoveEvent = delegate { };
public event UnityAction menuConfirmEvent = delegate { };
public event UnityAction menuCancelEvent = delegate { };
public event UnityAction menuClickButtonEvent = delegate { };
public event UnityAction closePopupEvent = delegate { };
public event UnityAction menuPauseEvent = delegate { };
public event UnityAction menuCloseEvent = delegate { };
public event UnityAction openInventoryEvent = delegate { }; // Used to bring up the inventory
public event UnityAction<float> menuSwitchTab = delegate { };

EnableGameplayInput();
}
private void OnDisable()
{
DisableAllInput();

public void OnOpenInventory(InputAction.CallbackContext context)
{
{
}
closeInventoryEvent.Invoke();
{ menuCloseEvent.Invoke();
}
public void OnInventoryActionButton(InputAction.CallbackContext context)
{

interactEvent.Invoke();
}
public void OnClosePopupEvent(InputAction.CallbackContext context)
{
if (context.phase == InputActionPhase.Performed)
closePopupEvent.Invoke();
}
public void OnJump(InputAction.CallbackContext context)
{

public void OnPause(InputAction.CallbackContext context)
{
if (context.phase == InputActionPhase.Performed)
pauseEvent.Invoke();
{ menuPauseEvent.Invoke();
}
public void OnRotateCamera(InputAction.CallbackContext context)
{

public void OnMoveSelection(InputAction.CallbackContext context)
{
if (context.phase == InputActionPhase.Performed)
moveSelectionEvent();
moveSelectionEvent.Invoke();
advanceDialogueEvent();
advanceDialogueEvent.Invoke();
menuConfirmEvent();
menuClickButtonEvent.Invoke();
/* public void OnCancel(InputAction.CallbackContext context)
{
if (context.phase == InputActionPhase.Performed)
menuCancelEvent();
}*/
menuMouseMoveEvent();
menuMouseMoveEvent.Invoke();
menuUnpauseEvent();
{
menuUnpauseEvent.Invoke();
}
public void EnableDialogueInput()
{

public void OnChangeTab(InputAction.CallbackContext context)
{
if (context.phase == InputActionPhase.Performed)
menuSwitchTab.Invoke(context.ReadValue<float>());
menuSwitchTab.Invoke(context.ReadValue<float>());
public void OnClick(InputAction.CallbackContext context)
{
}
public void OnSubmit(InputAction.CallbackContext context)
{
}
public void OnPoint(InputAction.CallbackContext context)
{
}
public void OnRightClick(InputAction.CallbackContext context)
{
}
public void OnNavigate(InputAction.CallbackContext context)
{
}
}

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


private VoidEventChannelSO _onInteractionEndedEvent = default;
[SerializeField]
private InputReader _inputReader = default;
private InputReader _inputReader = default;
_actionButtonClicked.OnEventRaised += ActionButtonEventRaised;
_changeTabEvent.OnEventRaised += ChangeTabEventRaised;
_selectItemEvent.OnEventRaised += InspectItem;
_onInteractionEndedEvent.OnEventRaised += InteractionEnded;
_actionButtonClicked.OnEventRaised += ActionButtonEventRaised;
_changeTabEvent.OnEventRaised += ChangeTabEventRaised;
_selectItemEvent.OnEventRaised += InspectItem;
_onInteractionEndedEvent.OnEventRaised += InteractionEnded;
_actionButtonClicked.OnEventRaised -= ActionButtonEventRaised;
_changeTabEvent.OnEventRaised -= ChangeTabEventRaised;
_selectItemEvent.OnEventRaised -= InspectItem;
_actionButtonClicked.OnEventRaised -= ActionButtonEventRaised;
_changeTabEvent.OnEventRaised -= ChangeTabEventRaised;
_selectItemEvent.OnEventRaised -= InspectItem;
if (orientation != 0)
if(orientation!=0)
{
bool isLeft = orientation < 0;
int initialIndex = _tabTypesList.FindIndex(o => o == _selectedTab);

initialIndex++;
}
initialIndex = Mathf.Clamp(initialIndex, 0, _tabTypesList.Count - 1);
initialIndex= Mathf.Clamp(initialIndex, 0, _tabTypesList.Count-1);
ChangeTabEventRaised(_tabTypesList[initialIndex]);
ChangeTabEventRaised(_tabTypesList[initialIndex]);
}

FillTypeTabs(_tabTypesList, _selectedTab);
List<ItemStack> listItemsToShow = new List<ItemStack>();
listItemsToShow = _currentInventory.Items.FindAll(o => o.Item.ItemType.TabType == _selectedTab);
FillItems(listItemsToShow);
}
else

//hover First Element
if (_instanciatedItems.Count > 0)
{
Debug.Log("SelectItem " + _instanciatedItems[0]._currentItem.Item);
}
public void UpdateOnItemInInventory(ItemStack itemToUpdate, bool removeItem)
{

22
UOP1_Project/Assets/Scripts/Menu/MenuSelectionHandler.cs


EventSystem.current.SetSelectedGameObject(_defaultSelection);
}
/// <summary>
/// Fired by keyboard and gamepad inputs. Current selected UI element will be the ui Element that was selected
/// when the event was fired. The _currentSelection is updated later on, after the EventSystem moves to the

{
Cursor.visible = false;
// Handle case where no UI element is selected because mouse left selectable bounds
if (EventSystem.current.currentSelectedGameObject == null)
EventSystem.current.SetSelectedGameObject(currentSelection);

public void HandleMouseExit(GameObject UIElement)
{
{
}
// deselect UI element if mouse moves away from it
// keep selecting the last thing the mouse has selected
EventSystem.current.SetSelectedGameObject(null);
EventSystem.current.SetSelectedGameObject(currentSelection);
}
/// <summary>

public bool AllowsSubmit()
{
// if LMB is not down, there is no edge case to handle, allow the event to continue
return !_inputReader.LeftMouseDown()
// if we know mouse & keyboard are on different elements, do not allow interaction to continue

/// Fired by gamepad or keyboard navigation inputs
/// </summary>
/// <param name="UIElement"></param>
public void UpdateSelection(GameObject UIElement) => currentSelection = UIElement;
public void UpdateSelection(GameObject UIElement)
{
if (UIElement.GetComponent<MultiInputSelectableElement>() != null)
{
mouseSelection = UIElement;
currentSelection = UIElement;
}
}
// Debug
// private void OnGUI()
// {

1
UOP1_Project/Assets/Scripts/Menu/MultiInputButton.cs


if (_menuSelectionHandler.AllowsSubmit())
base.OnSubmit(eventData);
}
}

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


_inputReader.openInventoryEvent += SetInventoryScreen;
}
void ResetUI()

void CloseSettingScreen()
{
Debug.Log("Close Setting screen");
//unsub from close setting events
_inputReader.menuCloseEvent -= CloseSettingScreen;
_closeSettingScreenEvent.OnEventRaised -= CloseSettingScreen;

_interactionPanel.gameObject.SetActive(isOpenEvent);
}
}

18
UOP1_Project/Assets/Scripts/UI/UIMenuManager.cs


private bool _hasSaveData;
[SerializeField] private InputReader _inputReader = default;
private void OnEnable()
private IEnumerator Start()
yield return new WaitForSeconds(1); //waiting time for all scenes to be loaded
SetMenuScreen();
}
void SetMenuScreen()

if(_hasSaveData)
{
_continueButton.Select();
_continueButton.Select();
{ _NewGameButton.Select(); }
{
_NewGameButton.Select();
}
}

{
_settingsPanel.SetActive(true);
_inputReader.menuCloseEvent += CloseSettingsScreen;
_closeSettingsEvent.OnEventRaised += CloseSettingsScreen;
_closeSettingsEvent.OnEventRaised -= CloseSettingsScreen;
_settingsPanel.SetActive(false);
SetMenuScreen();

_creditsPanel.SetActive(true);
_inputReader.menuCloseEvent += CloseCreditsScreen;
_closeCreditsEvent.OnEventRaised += CloseCreditsScreen;
_closeCreditsEvent.OnEventRaised -= CloseCreditsScreen;
_creditsPanel.SetActive(false);
SetMenuScreen();

24
UOP1_Project/Assets/Scripts/UI/UISettingFieldsFiller.cs


{
[SerializeField]
private UISettingItemFiller[] _settingfieldsList = default;
[SerializeField]
private InputReader _inputReader = default;
if(i< settingItems.Count)
if(i < settingItems.Count)
{
SetField(settingItems[i], _settingfieldsList[i]);
_settingfieldsList[i].gameObject.SetActive(true);

public void SelectFields(SettingTabType tabType)
{
}
public void SetField(SettingField field, UISettingItemFiller uiField)
{

}
uiField.SetSettingField(paginationCount, selectedPaginationIndex, selectedOption, fieldTitle, fieldType);
uiField.FillSettingField(paginationCount, selectedPaginationIndex, selectedOption, fieldTitle, fieldType);
}

{
return 1;
}
}
int _selectedFieldIndex;
void NextField()
{
}
void PreviousField()
{
}
}

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


public event UnityAction _nextOption = delegate { };
public event UnityAction _previousOption = delegate { };
public void SetSettingField(int paginationCount, int selectedPaginationIndex, string selectedOption, LocalizedString fieldTitle, SettingFieldType fieldType)
public void FillSettingField(int paginationCount, int selectedPaginationIndex, string selectedOption, LocalizedString fieldTitle, SettingFieldType fieldType)
{
_fieldType = fieldType;
_pagination.SetPagination(paginationCount, selectedPaginationIndex);

public void SetSettingNewOption(int selectedPaginationIndex, string selectedOption)
public void FillSettingNewOption(int selectedPaginationIndex, string selectedOption)
{
_pagination.SetCurrentPagination(selectedPaginationIndex);
_currentSelectedOption.text = selectedOption;

10
UOP1_Project/Assets/Scripts/UI/UISettingManager.cs


private UISettingFieldsFiller _settingFieldsFiller = default;
private void Start()
{
SetTabs();
SetFields(SettingTabType.Graphics);
if (settingTabsList.Count > 0)
{
SetTabs();
SettingTabType defaultTabType = settingTabsList[0].settingTabsType;
SelectTab(defaultTabType);
}
}
public void SetTabs()

public void SelectTab(SettingTabType selectedTab)
{
_settingTabFiller.SelectTab(selectedTab);
SetFields(selectedTab);
}
public void SetFields(SettingTabType selectedTab)

714
UOP1_Project/Assets/Settings/Input/GameInput.inputactions


"interactions": ""
},
{
"name": "Navigate",
"type": "Value",
"id": "41e1a9d3-6a1b-4ad8-83e5-bc91b00776d6",
"expectedControlType": "Vector2",
"processors": "",
"interactions": ""
},
{
"name": "Submit",
"type": "Button",
"id": "b81d85ab-f624-432d-89ce-ad8ba0ccf287",
"expectedControlType": "Button",
"processors": "",
"interactions": ""
},
{
"name": "Confirm",
"type": "Button",
"id": "96e1d616-4de6-46d2-9e46-9ba5a4430ff2",

"type": "Button",
"id": "60a66e41-5063-4c5c-b8db-de7aa1aaa1de",
"expectedControlType": "Button",
"processors": "",
"interactions": ""
},
{
"name": "Click",
"type": "PassThrough",
"id": "3c44a1cc-f827-4160-814f-7ac94e688aa5",
"expectedControlType": "Button",
"processors": "",
"interactions": ""
},
{
"name": "Point",
"type": "PassThrough",
"id": "554c5350-fb4a-4799-b522-67713993518b",
"expectedControlType": "Vector2",
"processors": "",
"interactions": ""
},
{
"name": "RightClick",
"type": "PassThrough",
"id": "7f6dfbfa-5b44-4a95-bde3-feb4d1958c1e",
"expectedControlType": "",
"processors": "",
"interactions": ""
}

"action": "InventoryActionButton",
"isComposite": false,
"isPartOfComposite": false
}
]
},
{
"name": "Dialogues",
"id": "53768bd8-c94e-4805-abee-e6c15ca1fa64",
"actions": [
{
"name": "MoveSelection",
"type": "Value",
"id": "321a676a-1117-48f9-87de-5137dbc7ff36",
"expectedControlType": "Vector2",
"processors": "StickDeadzone",
"interactions": ""
"name": "AdvanceDialogue",
"type": "Button",
"id": "9ace3f39-c79b-4bbc-ac18-26cafae1f479",
"expectedControlType": "Button",
"processors": "",
"interactions": ""
}
],
"bindings": [
{
"id": "7fdec36e-9182-4c02-b692-3025d78c8431",
"path": "<Keyboard>/space",
"id": "35b2621b-540f-4596-b465-01509aeb1abd",
"path": "<Mouse>/leftButton",
"groups": "KeyboardOrGamepad",
"action": "AdvanceDialogue",
"groups": ";Keyboard&Mouse",
"action": "Click",
"id": "08979c15-12c2-4736-962a-03eec0bff52f",
"path": "<Gamepad>/buttonSouth",
"id": "d31f29a9-70b0-46a6-a95a-8392785e17db",
"path": "<Mouse>/position",
"groups": "KeyboardOrGamepad",
"action": "Jump",
"groups": "Keyboard&Mouse",
"action": "Point",
"id": "79fef163-a828-41ee-a93a-f048723efc24",
"path": "<Gamepad>/buttonSouth",
"id": "f0675aa2-5361-4e06-a931-2cdce6ca9082",
"path": "<Mouse>/rightButton",
"groups": "KeyboardOrGamepad",
"action": "AdvanceDialogue",
"groups": ";Keyboard&Mouse",
"action": "RightClick",
"name": "Gamepad Left Stick",
"id": "e394ce70-6a98-45cb-98ee-3b20d27a398a",
"path": "2DVector(mode=1)",
"name": "",
"id": "40812b22-b3cc-47df-9ce6-cafe7aa75194",
"path": "*/{Submit}",
"action": "MoveSelection",
"isComposite": true,
"isPartOfComposite": false
},
{
"name": "up",
"id": "8bc6adce-3a54-42ce-8517-eece88cb661f",
"path": "<Gamepad>/leftStick/up",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "MoveSelection",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "down",
"id": "5aff7603-0943-4b26-b8cc-d6eac659e263",
"path": "<Gamepad>/leftStick/down",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "MoveSelection",
"action": "Submit",
"isPartOfComposite": true
},
{
"name": "Gamepad Dpad",
"id": "acc1b4ce-fbf1-42e8-b5bc-adbd2d6683e7",
"path": "2DVector(mode=1)",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "MoveSelection",
"isComposite": true,
"name": "up",
"id": "e3bf74b2-d43d-4388-9799-ea5cfb9a5f0e",
"path": "<Gamepad>/dpad/down",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "MoveSelection",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "down",
"id": "3feb6021-6cda-4c4c-8c3a-5759797818b7",
"path": "<Gamepad>/dpad/down",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "MoveSelection",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "left",
"id": "ff186dd7-80dc-45d5-abed-2a1508fdea05",
"path": "<Gamepad>/dpad/left",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "MoveSelection",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "right",
"id": "ccaa05f6-5ae3-415e-8aca-2979f97ed110",
"path": "<Gamepad>/dpad/right",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "MoveSelection",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "left",
"id": "434b8802-4e6f-4fd8-b9a3-29259beb030e",
"path": "<Gamepad>/leftStick/left",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "MoveSelection",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "right",
"id": "c3b4dc99-5a17-4abf-bd3b-0dff6bee59e5",
"path": "<Gamepad>/leftStick/right",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "MoveSelection",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "Keyboard WASD",
"id": "eb995151-9fec-4a96-982d-35630997a2db",
"path": "2DVector(mode=1)",
"interactions": "",
"processors": "",
"groups": "",
"action": "MoveSelection",
"isComposite": true,
"isPartOfComposite": false
},
{
"name": "up",
"id": "e7ae5426-fddc-4538-8b11-02f3775e8a94",
"path": "<Keyboard>/w",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "MoveSelection",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "down",
"id": "67eae0cd-5651-4dd3-ae9a-d77e8b6ccfc0",
"path": "<Keyboard>/s",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "MoveSelection",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "left",
"id": "42a182be-4f7a-4b9e-b71f-e40bbfda9d65",
"path": "<Keyboard>/a",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "MoveSelection",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "right",
"id": "86e17316-e711-4701-946b-a1dfbccae2dc",
"path": "<Keyboard>/d",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "MoveSelection",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "Keyboard Arrows",
"id": "96e37e7c-b10b-4cd5-bf7e-fde7c8245ecb",
"path": "2DVector(mode=1)",
"interactions": "",
"processors": "",
"groups": "",
"action": "MoveSelection",
"isComposite": true,
"isPartOfComposite": false
},
{
"name": "up",
"id": "8fe5410a-1366-4abc-98fd-0eb547c66d6c",
"path": "<Keyboard>/upArrow",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "MoveSelection",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "down",
"id": "38e85ec9-d601-4e86-acbe-6f61ff72476a",
"path": "<Keyboard>/downArrow",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "MoveSelection",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "left",
"id": "46038b59-6fc5-4cad-b0c3-78728baa916b",
"path": "<Keyboard>/leftArrow",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "MoveSelection",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "right",
"id": "26ea8a5e-e77d-416c-aa81-28deef164ae9",
"path": "<Keyboard>/rightArrow",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "MoveSelection",
"isComposite": false,
"isPartOfComposite": true
}
]
},
{
"name": "UI",
"id": "ab932c38-5f65-4148-8d07-3705a3972187",
"actions": [
{
"name": "Navigate",
"type": "Value",
"id": "13f380cd-bf63-4f39-93c4-1e7a4d2a655f",
"expectedControlType": "Vector2",
"processors": "",
"interactions": ""
},
{
"name": "Submit",
"type": "Button",
"id": "090de396-60fb-497f-aa78-1bb203a2a5bb",
"expectedControlType": "Button",
"processors": "",
"interactions": ""
},
{
"name": "Cancel",
"type": "Button",
"id": "0fed7e1b-2af4-4e97-9469-8f507b3fc692",
"expectedControlType": "Button",
"processors": "",
"interactions": ""
},
{
"name": "Point",
"type": "PassThrough",
"id": "c240d086-a88e-4b32-888c-b390fe3170be",
"expectedControlType": "Vector2",
"processors": "",
"interactions": ""
},
{
"name": "Click",
"type": "PassThrough",
"id": "a9053c93-79f0-4f03-b633-e6206464a892",
"expectedControlType": "Button",
"processors": "",
"interactions": ""
},
{
"name": "ScrollWheel",
"type": "PassThrough",
"id": "3ebbc755-b55c-457a-a167-b4c76dd35aae",
"expectedControlType": "Vector2",
"processors": "",
"interactions": ""
},
{
"name": "MiddleClick",
"type": "PassThrough",
"id": "1fabb0e7-42b0-48cc-a6dc-2ee69eb5c3d7",
"expectedControlType": "",
"processors": "",
"interactions": ""
},
{
"name": "RightClick",
"type": "PassThrough",
"id": "6954ca40-1059-46c9-8b83-84e2eaba10b1",
"expectedControlType": "",
"processors": "",
"interactions": ""
},
{
"name": "TrackedDevicePosition",
"type": "PassThrough",
"id": "982a2fd5-8046-4952-adc3-d3f8b80b40a9",
"expectedControlType": "Vector3",
"processors": "",
"interactions": ""
},
{
"name": "TrackedDeviceOrientation",
"type": "PassThrough",
"id": "e5f183bf-b56d-4544-9e91-dd3a8ee857bc",
"expectedControlType": "Quaternion",
"processors": "",
"interactions": ""
}
],
"bindings": [
{
"id": "70a3d601-734b-4e02-a79a-a51a09c216ae",
"id": "67ae7bfe-3e5d-4cd5-a72f-9885cfeb5531",
"path": "2DVector",
"interactions": "",
"processors": "",

},
{
"name": "up",
"id": "7f4df2b0-13bb-4daf-801c-de4f7152d721",
"id": "cb286e5c-9df3-47b6-bd47-ddf8793ba74d",
"path": "<Gamepad>/leftStick/up",
"interactions": "",
"processors": "",

},
{
"name": "up",
"id": "2803b480-c400-445d-8f3d-23ee9d72399d",
"id": "b7f48bc3-fe32-4ea1-9c3c-f56a1c44ed88",
"path": "<Gamepad>/rightStick/up",
"interactions": "",
"processors": "",

},
{
"name": "down",
"id": "c31ae40d-ef9a-4a6f-a06b-5cd5e5176ade",
"id": "ff94cc15-e60b-43c5-97f9-24649f412fe1",
"path": "<Gamepad>/leftStick/down",
"interactions": "",
"processors": "",

},
{
"name": "down",
"id": "bc0e412b-a5a3-4d67-adfc-57bf141c4549",
"id": "e11acd3a-2071-4874-856a-7244781e5f5c",
"path": "<Gamepad>/rightStick/down",
"interactions": "",
"processors": "",

},
{
"name": "left",
"id": "fbb0c7a1-60a2-4179-9e19-609a058fdf49",
"id": "ccfeaf5d-d0d9-4a01-8e61-df4e13790407",
"path": "<Gamepad>/leftStick/left",
"interactions": "",
"processors": "",

},
{
"name": "left",
"id": "b42d6496-db76-45ad-819f-76c7b794ef67",
"id": "d659f372-5110-4992-bc9d-4fc3797b31d6",
"path": "<Gamepad>/rightStick/left",
"interactions": "",
"processors": "",

},
{
"name": "right",
"id": "b38989eb-3c8f-41a8-b48c-2a90cd55c118",
"id": "c3256c1e-f0ce-4eb5-8408-795413109627",
"path": "<Gamepad>/leftStick/right",
"interactions": "",
"processors": "",

},
{
"name": "right",
"id": "be89dbde-27e2-4244-a2be-eff5f0251a2b",
"id": "9042e334-f8b3-47a6-b402-500fe11c23c9",
"path": "<Gamepad>/rightStick/right",
"interactions": "",
"processors": "",

},
{
"name": "",
"id": "31cd33cd-7b6a-4766-b07b-35171e2e22e5",
"id": "65ab8341-18ca-457b-9d2b-f36f8ac848cd",
"path": "<Gamepad>/dpad",
"interactions": "",
"processors": "",

},
{
"name": "Joystick",
"id": "246075f9-35c2-4696-b1d3-0febc353dc67",
"id": "424384f8-2fd0-47bd-93e1-f217a4b03b7f",
"path": "2DVector",
"interactions": "",
"processors": "",

},
{
"name": "up",
"id": "84bd2888-38d1-49da-b763-d76fa33d8391",
"id": "c57cb9d7-2157-4352-a15b-79f6a1b3b911",
"path": "<Joystick>/stick/up",
"interactions": "",
"processors": "",

},
{
"name": "down",
"id": "dd7c01e4-44bc-4f4c-b6e9-c5c1d3317720",
"id": "974dad09-6c97-4c8c-89f1-893c958e1b79",
"path": "<Joystick>/stick/down",
"interactions": "",
"processors": "",

},
{
"name": "left",
"id": "c9301226-eea4-46a6-b175-41316fa121e8",
"id": "64d85eb3-ca00-4bbc-967c-c259ccdb4a5b",
"path": "<Joystick>/stick/left",
"interactions": "",
"processors": "",

},
{
"name": "right",
"id": "47850e92-a155-46f3-8878-8e2e0d0be1d5",
"id": "b7cec2e3-9f06-4c50-83f5-2d8341498f27",
"path": "<Joystick>/stick/right",
"interactions": "",
"processors": "",

},
{
"name": "Keyboard",
"id": "2ea698ea-5e9a-47bf-81fe-ae45352b89dc",
"id": "0130a7a5-c304-414e-b8d7-bd3f5db033f7",
"path": "2DVector",
"interactions": "",
"processors": "",

},
{
"name": "up",
"id": "a6785cf4-8e10-4e78-ac17-fac30b46106c",
"id": "979ca574-fc98-4d35-9e47-a5258f40003e",
"path": "<Keyboard>/w",
"interactions": "",
"processors": "",

},
{
"name": "up",
"id": "47fd6b9e-195e-47e7-b91e-4245003b857f",
"id": "c996d74d-2ee9-48af-a1ee-7d2122e2f001",
"path": "<Keyboard>/upArrow",
"interactions": "",
"processors": "",

},
{
"name": "down",
"id": "57b2daad-3543-40be-911f-705c7b8da42d",
"id": "83a23568-8971-4bbd-866a-ac2bbc1e9e10",
"path": "<Keyboard>/s",
"interactions": "",
"processors": "",

},
{
"name": "down",
"id": "e3bead85-eb95-4caf-b39b-c8803e5f37e1",
"id": "56560a2e-e901-4bb5-8061-5796ca328497",
"path": "<Keyboard>/downArrow",
"interactions": "",
"processors": "",

},
{
"name": "left",
"id": "c197a586-1302-4966-8ac1-2b1647d691d8",
"id": "31cc18d0-fc0e-476e-9989-edc489c531f5",
"path": "<Keyboard>/a",
"interactions": "",
"processors": "",

},
{
"name": "left",
"id": "390810f4-0bdc-441e-8ebd-9d464b01631c",
"id": "ef804a9f-b2e5-4da4-92c4-424f39f25e5e",
"path": "<Keyboard>/leftArrow",
"interactions": "",
"processors": "",

},
{
"name": "right",
"id": "fdbe4db7-eec2-4890-8910-0942a4178fe5",
"id": "dab0b27a-77b5-4d0a-8d3c-deb8ac27fb33",
"path": "<Keyboard>/d",
"interactions": "",
"processors": "",

},
{
"name": "right",
"id": "8880b0fd-a254-4220-8054-06ae97682883",
"id": "4579dbe7-abf7-4fd3-82d3-fb68f3ddd73e",
"path": "<Keyboard>/rightArrow",
"interactions": "",
"processors": "",

"isPartOfComposite": true
}
]
},
{
"name": "Dialogues",
"id": "53768bd8-c94e-4805-abee-e6c15ca1fa64",
"actions": [
{
"name": "MoveSelection",
"type": "Value",
"id": "321a676a-1117-48f9-87de-5137dbc7ff36",
"expectedControlType": "Vector2",
"processors": "StickDeadzone",
"interactions": ""
"name": "AdvanceDialogue",
"type": "Button",
"id": "9ace3f39-c79b-4bbc-ac18-26cafae1f479",
"expectedControlType": "Button",
"processors": "",
"interactions": ""
}
],
"bindings": [
{
"id": "529de41d-d33c-45c7-a63c-1253e8c28db9",
"path": "*/{Submit}",
"id": "7fdec36e-9182-4c02-b692-3025d78c8431",
"path": "<Keyboard>/space",
"groups": "",
"action": "Submit",
"groups": "KeyboardOrGamepad",
"action": "AdvanceDialogue",
"id": "360e452d-7e88-4322-b7cb-eebc676f3fed",
"path": "*/{Cancel}",
"id": "08979c15-12c2-4736-962a-03eec0bff52f",
"path": "<Gamepad>/buttonSouth",
"groups": "",
"action": "Cancel",
"groups": "KeyboardOrGamepad",
"action": "Jump",
"id": "caa12b60-dcc1-4b2a-9366-f36f6e64f127",
"path": "<Mouse>/position",
"id": "79fef163-a828-41ee-a93a-f048723efc24",
"path": "<Gamepad>/buttonSouth",
"groups": "Keyboard&Mouse",
"action": "Point",
"groups": "KeyboardOrGamepad",
"action": "AdvanceDialogue",
"name": "",
"id": "885e17e8-0421-43bb-b93c-91c543327848",
"path": "<Pen>/position",
"name": "Gamepad Left Stick",
"id": "e394ce70-6a98-45cb-98ee-3b20d27a398a",
"path": "2DVector(mode=1)",
"groups": "Keyboard&Mouse",
"action": "Point",
"groups": "",
"action": "MoveSelection",
"isComposite": true,
"isPartOfComposite": false
},
{
"name": "up",
"id": "8bc6adce-3a54-42ce-8517-eece88cb661f",
"path": "<Gamepad>/leftStick/up",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "MoveSelection",
"isPartOfComposite": true
},
{
"name": "down",
"id": "5aff7603-0943-4b26-b8cc-d6eac659e263",
"path": "<Gamepad>/leftStick/down",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "MoveSelection",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "Gamepad Dpad",
"id": "acc1b4ce-fbf1-42e8-b5bc-adbd2d6683e7",
"path": "2DVector(mode=1)",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "MoveSelection",
"isComposite": true,
"name": "",
"id": "e2b33e2d-ae2d-4688-bd69-f33ecdf36686",
"path": "<Touchscreen>/touch*/position",
"name": "up",
"id": "e3bf74b2-d43d-4388-9799-ea5cfb9a5f0e",
"path": "<Gamepad>/dpad/down",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "MoveSelection",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "down",
"id": "3feb6021-6cda-4c4c-8c3a-5759797818b7",
"path": "<Gamepad>/dpad/down",
"groups": "Touch",
"action": "Point",
"groups": "KeyboardOrGamepad",
"action": "MoveSelection",
"isPartOfComposite": false
"isPartOfComposite": true
"name": "",
"id": "35fd277f-c329-485c-9069-809725ad6e98",
"path": "<Mouse>/leftButton",
"name": "left",
"id": "ff186dd7-80dc-45d5-abed-2a1508fdea05",
"path": "<Gamepad>/dpad/left",
"groups": ";Keyboard&Mouse",
"action": "Click",
"groups": "KeyboardOrGamepad",
"action": "MoveSelection",
"isPartOfComposite": false
"isPartOfComposite": true
"name": "",
"id": "f966c9a7-c0ee-4cae-8c25-450921435b1a",
"path": "<Pen>/tip",
"name": "right",
"id": "ccaa05f6-5ae3-415e-8aca-2979f97ed110",
"path": "<Gamepad>/dpad/right",
"groups": ";Keyboard&Mouse",
"action": "Click",
"groups": "KeyboardOrGamepad",
"action": "MoveSelection",
"isPartOfComposite": false
"isPartOfComposite": true
"name": "",
"id": "423eebcc-7a02-47c6-9f37-1d611b787e81",
"path": "<Touchscreen>/touch*/press",
"name": "left",
"id": "434b8802-4e6f-4fd8-b9a3-29259beb030e",
"path": "<Gamepad>/leftStick/left",
"groups": "Touch",
"action": "Click",
"groups": "KeyboardOrGamepad",
"action": "MoveSelection",
"isPartOfComposite": false
"isPartOfComposite": true
"name": "",
"id": "163871a4-ff95-4949-b1e1-17466ab251cf",
"path": "<XRController>/trigger",
"name": "right",
"id": "c3b4dc99-5a17-4abf-bd3b-0dff6bee59e5",
"path": "<Gamepad>/leftStick/right",
"groups": "XR",
"action": "Click",
"groups": "KeyboardOrGamepad",
"action": "MoveSelection",
"isPartOfComposite": true
},
{
"name": "Keyboard WASD",
"id": "eb995151-9fec-4a96-982d-35630997a2db",
"path": "2DVector(mode=1)",
"interactions": "",
"processors": "",
"groups": "",
"action": "MoveSelection",
"isComposite": true,
"name": "",
"id": "efbaa1fc-6dae-4579-bdaa-6619cbae9e7b",
"path": "<Mouse>/scroll",
"name": "up",
"id": "e7ae5426-fddc-4538-8b11-02f3775e8a94",
"path": "<Keyboard>/w",
"groups": ";Keyboard&Mouse",
"action": "ScrollWheel",
"groups": "KeyboardOrGamepad",
"action": "MoveSelection",
"isPartOfComposite": false
"isPartOfComposite": true
"name": "",
"id": "3baac3f9-50d0-47c5-8c0a-6e0f939bc3c3",
"path": "<Mouse>/middleButton",
"name": "down",
"id": "67eae0cd-5651-4dd3-ae9a-d77e8b6ccfc0",
"path": "<Keyboard>/s",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "MoveSelection",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "left",
"id": "42a182be-4f7a-4b9e-b71f-e40bbfda9d65",
"path": "<Keyboard>/a",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "MoveSelection",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "right",
"id": "86e17316-e711-4701-946b-a1dfbccae2dc",
"path": "<Keyboard>/d",
"groups": ";Keyboard&Mouse",
"action": "MiddleClick",
"groups": "KeyboardOrGamepad",
"action": "MoveSelection",
"isPartOfComposite": true
},
{
"name": "Keyboard Arrows",
"id": "96e37e7c-b10b-4cd5-bf7e-fde7c8245ecb",
"path": "2DVector(mode=1)",
"interactions": "",
"processors": "",
"groups": "",
"action": "MoveSelection",
"isComposite": true,
"name": "",
"id": "a98f1d54-0e5b-40ac-8340-5c8b73e4f4fc",
"path": "<Mouse>/rightButton",
"name": "up",
"id": "8fe5410a-1366-4abc-98fd-0eb547c66d6c",
"path": "<Keyboard>/upArrow",
"groups": ";Keyboard&Mouse",
"action": "RightClick",
"groups": "KeyboardOrGamepad",
"action": "MoveSelection",
"isPartOfComposite": false
"isPartOfComposite": true
"name": "",
"id": "af18c884-cd38-4168-aad2-60ab4d19e244",
"path": "<XRController>/devicePosition",
"name": "down",
"id": "38e85ec9-d601-4e86-acbe-6f61ff72476a",
"path": "<Keyboard>/downArrow",
"groups": "XR",
"action": "TrackedDevicePosition",
"groups": "KeyboardOrGamepad",
"action": "MoveSelection",
"isPartOfComposite": false
"isPartOfComposite": true
"name": "",
"id": "af4993c8-5bb3-48a2-95d1-de9d484cfe3e",
"path": "<XRController>/deviceRotation",
"name": "left",
"id": "46038b59-6fc5-4cad-b0c3-78728baa916b",
"path": "<Keyboard>/leftArrow",
"groups": "XR",
"action": "TrackedDeviceOrientation",
"groups": "KeyboardOrGamepad",
"action": "MoveSelection",
"isPartOfComposite": false
"isPartOfComposite": true
},
{
"name": "right",
"id": "26ea8a5e-e77d-416c-aa81-28deef164ae9",
"path": "<Keyboard>/rightArrow",
"interactions": "",
"processors": "",
"groups": "KeyboardOrGamepad",
"action": "MoveSelection",
"isComposite": false,
"isPartOfComposite": true
}
]
}

16
UOP1_Project/UserSettings/EditorUserSettings.asset


serializedVersion: 4
m_ConfigSettings:
RecentlyUsedScenePath-0:
value: 22424703114646680e0b0227036c683926582c2f3f3c2f3e2a0e0f3cf7ee3007d1ea37e5eb742a323016f6
value: 22424703114646680c031c2e1530103c19141926253227242426137cb2ae6569acb67bf9f53f29353c15a0100530062af30d0c4bc50e060e121af4011fbf3d161fd0588d2fef2a35825630cfc31ac4e2d2d394d9dde7e2dbcad6affcb4c5c9cddcbfb0f5a3bce5
value: 22424703114646680c031c2e1530103c19141926253227242426137cb2ae6569acb67bf9f53f29353c15a0100530062af30d0c4bc50e060e121af4011fbf3d161fd0588d2fef2a35825630cfc31ac4e2d2d394d9dde7e2dbcad6affcb4c5c9cddcbfb0f5a3bce5
value: 22424703114646680e0b0227036c6a39563e163e292f34313920123dacf53a31f6fe
value: 22424703114646680e0b0227036c6a39563e163e292f34313920123dacf53a31f6fe
value: 22424703114646680e0b0227036c68181f031d2823302f3e2a663a36ece52639eeca37f9ca3f3b352c0fc229082a082ffe0f3a08f3050f185e2cf80f12f75e061fcc0cdc
value: 22424703114646680e0b0227036c68181f031d2823302f3e2a663a36ece52639eeca37f9ca3f3b352c0fc229082a082ffe0f3a08f3050f185e2cf80f12f75e061fcc0cdc
value: 22424703114646680e0b0227036c68181f031d2823302f3e2a663f36e3e33c77d2f539f9e8293e300650a01e013f0237bc1f0702e212
value: 22424703114646680e0b0227036c68181f031d2823302f3e2a663f36e3e33c77d2f539f9e8293e300650a01e013f0237bc1f0702e212
value: 22424703114646680e0b0227036c731f15160c232326357f0f2c1c30eaae2136ebf32f
value: 22424703114646680e0b0227036c731f15160c232326357f0f2c1c30eaae2136ebf32f
value: 22424703114646680e0b0227036c721118161f2f3e3b6900283b0e3af1f43136f6ca37e7e63d3a2e2a4cfa320d2a18
value: 22424703114646680e0b0227036c683926582c2f3f3c2f3e2a0e0f3cf7ee3076f7e93ffdfe
value: 22424703114646680e0b0227036c683926582c2f3f3c2f3e2a0e0f3cf7ee3007d1ea37e5eb742a323016f6
value: 22424703114646680e0b0227036c721118161f2f3e3b6900283b0e3af1f43136f6ca37e7e63d3a2e2a4cfa320d2a18
value: 22424703114646680e0b0227036c683926582c2f3f3c2f3e2a0e0f3cf7ee3076f7e93ffdfe
flags: 0
RecentlyUsedScenePath-8:
value: 22424703114646680e0b0227036c721118161f2f3e3b69172c241823eee12d76f7e93ffdfe

8
UOP1_Project/Assets/WIP/UI.meta


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

611
UOP1_Project/Assets/WIP/UI/UIHealtDisplay.prefab


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &455196798932656325
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 358584537197172349}
- component: {fileID: 1599723359886217568}
- component: {fileID: 5138323859197390585}
m_Layer: 9
m_Name: Heart (2)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &358584537197172349
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 455196798932656325}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 6352810064952983069}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &1599723359886217568
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 455196798932656325}
m_CullTransparentMesh: 1
--- !u!114 &5138323859197390585
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 455196798932656325}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 10911, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!1 &2696794833251330545
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3545734335979156956}
- component: {fileID: 7627857720743474821}
- component: {fileID: 4923575773365521623}
m_Layer: 9
m_Name: Heart (3)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &3545734335979156956
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2696794833251330545}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 6352810064952983069}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &7627857720743474821
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2696794833251330545}
m_CullTransparentMesh: 1
--- !u!114 &4923575773365521623
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2696794833251330545}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 10911, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!1 &2815881603653157998
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6352810064952983069}
- component: {fileID: 6395593152779691077}
- component: {fileID: 7686382842736750647}
- component: {fileID: 4731765889197187948}
- component: {fileID: 7057594148529581253}
- component: {fileID: 5382124729891650614}
m_Layer: 9
m_Name: UIHealtDisplay
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &6352810064952983069
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2815881603653157998}
m_LocalRotation: {x: 0.011508226, y: -0.9995812, z: 0.00209032, w: 0.026469946}
m_LocalPosition: {x: 0, y: 0, z: -0}
m_LocalScale: {x: 0.015, y: 0.015, z: 1}
m_Children:
- {fileID: 479493725024631163}
- {fileID: 805034800503573862}
- {fileID: 358584537197172349}
- {fileID: 3545734335979156956}
- {fileID: 6087809287161891054}
- {fileID: 2889208702305137056}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: -0.010009766, y: 0.2800293}
m_SizeDelta: {x: 100, y: 20}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!223 &6395593152779691077
Canvas:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2815881603653157998}
m_Enabled: 1
serializedVersion: 3
m_RenderMode: 2
m_Camera: {fileID: 0}
m_PlaneDistance: 100
m_PixelPerfect: 0
m_ReceivesEvents: 1
m_OverrideSorting: 0
m_OverridePixelPerfect: 0
m_SortingBucketNormalizedSize: 0
m_AdditionalShaderChannelsFlag: 0
m_SortingLayerID: 0
m_SortingOrder: 0
m_TargetDisplay: 0
--- !u!114 &7686382842736750647
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2815881603653157998}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
m_Name:
m_EditorClassIdentifier:
m_UiScaleMode: 0
m_ReferencePixelsPerUnit: 100
m_ScaleFactor: 1
m_ReferenceResolution: {x: 800, y: 600}
m_ScreenMatchMode: 0
m_MatchWidthOrHeight: 0
m_PhysicalUnit: 3
m_FallbackScreenDPI: 96
m_DefaultSpriteDPI: 96
m_DynamicPixelsPerUnit: 1
m_PresetInfoIsWorld: 1
--- !u!114 &4731765889197187948
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2815881603653157998}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreReversedGraphics: 1
m_BlockingObjects: 0
m_BlockingMask:
serializedVersion: 2
m_Bits: 4294967295
--- !u!114 &7057594148529581253
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2815881603653157998}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f8dfad91156ef4bff806fff3c3f9eacd, type: 3}
m_Name:
m_EditorClassIdentifier:
_heartImages:
- {fileID: 3647031815024279509}
- {fileID: 5054149388442712904}
- {fileID: 5138323859197390585}
- {fileID: 4923575773365521623}
- {fileID: 3799196531022497756}
healthText: {fileID: 1164434712947447015}
_setHealthBar: {fileID: 11400000, guid: 22e3f27f002de44b4948988138dd9377, type: 2}
_inflictDamage: {fileID: 11400000, guid: be921b398c68d450e9e3c55dde697149, type: 2}
_restoreHealth: {fileID: 11400000, guid: de4a39f85969d44cba990125224ff7ef, type: 2}
--- !u!114 &5382124729891650614
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2815881603653157998}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 30649d3a9faa99c48a7b1166b86bf2a0, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Padding:
m_Left: 0
m_Right: 0
m_Top: 0
m_Bottom: 0
m_ChildAlignment: 0
m_Spacing: 0
m_ChildForceExpandWidth: 1
m_ChildForceExpandHeight: 1
m_ChildControlWidth: 1
m_ChildControlHeight: 1
m_ChildScaleWidth: 0
m_ChildScaleHeight: 0
m_ReverseArrangement: 0
--- !u!1 &2976475603547307888
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 479493725024631163}
- component: {fileID: 9010055178346947484}
- component: {fileID: 3647031815024279509}
m_Layer: 9
m_Name: Heart
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &479493725024631163
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2976475603547307888}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 6352810064952983069}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &9010055178346947484
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2976475603547307888}
m_CullTransparentMesh: 1
--- !u!114 &3647031815024279509
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2976475603547307888}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 10911, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!1 &5235661441434354422
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 805034800503573862}
- component: {fileID: 5549412471662682713}
- component: {fileID: 5054149388442712904}
m_Layer: 9
m_Name: Heart (1)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &805034800503573862
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5235661441434354422}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 6352810064952983069}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &5549412471662682713
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5235661441434354422}
m_CullTransparentMesh: 1
--- !u!114 &5054149388442712904
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5235661441434354422}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 10911, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!1 &5249698992990008558
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2889208702305137056}
- component: {fileID: 6012636341666066465}
- component: {fileID: 1164434712947447015}
m_Layer: 9
m_Name: Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &2889208702305137056
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5249698992990008558}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 6352810064952983069}
m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &6012636341666066465
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5249698992990008558}
m_CullTransparentMesh: 1
--- !u!114 &1164434712947447015
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5249698992990008558}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 14
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 10
m_MaxSize: 40
m_Alignment: 0
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: New Text
--- !u!1 &8406566819066868502
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6087809287161891054}
- component: {fileID: 7055524750633899273}
- component: {fileID: 3799196531022497756}
m_Layer: 9
m_Name: Heart (4)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &6087809287161891054
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8406566819066868502}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 6352810064952983069}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &7055524750633899273
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8406566819066868502}
m_CullTransparentMesh: 1
--- !u!114 &3799196531022497756
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8406566819066868502}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 10911, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1

78
UOP1_Project/Assets/WIP/UI/UIHealthBarManager.cs


using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class UIHealthBarManager : MonoBehaviour
{
Transform target;
int maxHealth=0;
int currentHealth=0;
[SerializeField] private Image[] _heartImages = default;
[SerializeField] private Text healthText = default;
[Header("Listening to")]
[SerializeField] private IntEventChannelSO _setHealthBar = default;
[SerializeField] private IntEventChannelSO _inflictDamage = default;
[SerializeField] private IntEventChannelSO _restoreHealth = default;
private void OnEnable()
{
_setHealthBar.OnEventRaised += SetHealthBar;
_inflictDamage.OnEventRaised += InflictDamage;
_restoreHealth.OnEventRaised += RestoreHealth;
}
private void OnDestroy()
{
_setHealthBar.OnEventRaised -= SetHealthBar;
_inflictDamage.OnEventRaised -= InflictDamage;
_restoreHealth.OnEventRaised -= RestoreHealth;
}
public void SetHealthBar(int _maxHealth)
{
maxHealth = _maxHealth;
currentHealth = _maxHealth;
setHeartImages();
}
public void InflictDamage(int _damage)
{
currentHealth -= _damage;
setHeartImages();
}
public void RestoreHealth(int _healthToAdd)
{
currentHealth += _healthToAdd;
setHeartImages();
}
void setHeartImages()
{
//clamp current value
currentHealth = Mathf.Clamp(currentHealth, 0, maxHealth);
healthText.text = currentHealth + "/" + maxHealth;
//find max heart index
int heartIndex = Mathf.CeilToInt( ((float)currentHealth / (float)maxHealth) * _heartImages.Length);
for (int i = 0; i < _heartImages.Length; i++)
{
_heartImages[i].color = Color.red;
if (_heartImages.Length > heartIndex)
{
_heartImages[i].gameObject.SetActive(i <= heartIndex);
}
}
}
}

394
UOP1_Project/Assets/Prefabs/UI/WIP/UIHealthbar.prefab


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &129456778788504016
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4477411494155732534}
- component: {fileID: 8675558951552184746}
m_Layer: 9
m_Name: SliderHealth
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &4477411494155732534
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 129456778788504016}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 3377568230114908328}
- {fileID: 7579906292151165910}
m_Father: {fileID: 6352810064952983069}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &8675558951552184746
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 129456778788504016}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 67db9e8f0e2ae9c40bc1e2b64352a6b4, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 0
m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 0
m_TargetGraphic: {fileID: 0}
m_FillRect: {fileID: 9168795744388526357}
m_HandleRect: {fileID: 0}
m_Direction: 0
m_MinValue: 0
m_MaxValue: 1
m_WholeNumbers: 0
m_Value: 0.558
m_OnValueChanged:
m_PersistentCalls:
m_Calls: []
--- !u!1 &2717470933152208211
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7579906292151165910}
m_Layer: 9
m_Name: Fill Area
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &7579906292151165910
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2717470933152208211}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 9168795744388526357}
m_Father: {fileID: 4477411494155732534}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.25}
m_AnchorMax: {x: 1, y: 0.75}
m_AnchoredPosition: {x: -5, y: 0}
m_SizeDelta: {x: -20, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &2770995023073704661
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3377568230114908328}
- component: {fileID: 3660815796988947421}
- component: {fileID: 3283600458638593579}
m_Layer: 9
m_Name: Background
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &3377568230114908328
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2770995023073704661}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 4477411494155732534}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.25}
m_AnchorMax: {x: 1, y: 0.75}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &3660815796988947421
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2770995023073704661}
m_CullTransparentMesh: 1
--- !u!114 &3283600458638593579
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2770995023073704661}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!1 &2815881603653157998
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6352810064952983069}
- component: {fileID: 6395593152779691077}
- component: {fileID: 7686382842736750647}
- component: {fileID: 4731765889197187948}
- component: {fileID: 7057594148529581253}
m_Layer: 9
m_Name: UIHealthbar
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &6352810064952983069
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2815881603653157998}
m_LocalRotation: {x: 0.011508226, y: -0.9995812, z: 0.00209032, w: 0.026469946}
m_LocalPosition: {x: 0, y: 0, z: -0}
m_LocalScale: {x: 0.015, y: 0.015, z: 1}
m_Children:
- {fileID: 4477411494155732534}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: -0.010009766, y: 0.2800293}
m_SizeDelta: {x: 100, y: 20}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!223 &6395593152779691077
Canvas:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2815881603653157998}
m_Enabled: 1
serializedVersion: 3
m_RenderMode: 2
m_Camera: {fileID: 0}
m_PlaneDistance: 100
m_PixelPerfect: 0
m_ReceivesEvents: 1
m_OverrideSorting: 0
m_OverridePixelPerfect: 0
m_SortingBucketNormalizedSize: 0
m_AdditionalShaderChannelsFlag: 0
m_SortingLayerID: 0
m_SortingOrder: 0
m_TargetDisplay: 0
--- !u!114 &7686382842736750647
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2815881603653157998}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
m_Name:
m_EditorClassIdentifier:
m_UiScaleMode: 0
m_ReferencePixelsPerUnit: 100
m_ScaleFactor: 1
m_ReferenceResolution: {x: 800, y: 600}
m_ScreenMatchMode: 0
m_MatchWidthOrHeight: 0
m_PhysicalUnit: 3
m_FallbackScreenDPI: 96
m_DefaultSpriteDPI: 96
m_DynamicPixelsPerUnit: 1
m_PresetInfoIsWorld: 0
--- !u!114 &4731765889197187948
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2815881603653157998}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreReversedGraphics: 1
m_BlockingObjects: 0
m_BlockingMask:
serializedVersion: 2
m_Bits: 4294967295
--- !u!114 &7057594148529581253
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2815881603653157998}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f8dfad91156ef4bff806fff3c3f9eacd, type: 3}
m_Name:
m_EditorClassIdentifier:
_healthBar: {fileID: 8675558951552184746}
_setHealthBar: {fileID: 11400000, guid: 22e3f27f002de44b4948988138dd9377, type: 2}
_inflictDamage: {fileID: 11400000, guid: be921b398c68d450e9e3c55dde697149, type: 2}
_restoreHealth: {fileID: 11400000, guid: de4a39f85969d44cba990125224ff7ef, type: 2}
--- !u!1 &8076465948275431472
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 9168795744388526357}
- component: {fileID: 6388844992306058055}
- component: {fileID: 8967380021000610061}
m_Layer: 9
m_Name: Fill
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &9168795744388526357
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8076465948275431472}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 7579906292151165910}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 10, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &6388844992306058055
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8076465948275431472}
m_CullTransparentMesh: 1
--- !u!114 &8967380021000610061
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8076465948275431472}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1

82
UOP1_Project/Assets/Scripts/UI/UIHealthBarManager.cs


using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class UIHealthBarManager : MonoBehaviour
{
Transform target;
int maxHealth = 0;
int currentHealth = 0;
[SerializeField] private Slider _healthBar = default;
[Header("Listening to")]
[SerializeField] private IntEventChannelSO _setHealthBar = default;
[SerializeField] private IntEventChannelSO _inflictDamage = default;
[SerializeField] private IntEventChannelSO _restoreHealth = default;
private void OnEnable()
{
if ((GetComponent<Canvas>() != null) && (Camera.main != null))
{
GetComponent<Canvas>().worldCamera = Camera.main;
target = Camera.main.transform;
}
}
private void Start()
{
_setHealthBar.OnEventRaised += SetHealthBar;
_inflictDamage.OnEventRaised += InflictDamage;
_restoreHealth.OnEventRaised += RestoreHealth;
}
private void OnDestroy()
{
_setHealthBar.OnEventRaised -= SetHealthBar;
_inflictDamage.OnEventRaised -= InflictDamage;
_restoreHealth.OnEventRaised -= RestoreHealth;
}
public void SetHealthBar(int _maxHealth)
{
maxHealth = _maxHealth;
currentHealth = _maxHealth;
setSlider();
}
public void InflictDamage(int _damage)
{
currentHealth -= _damage;
setSlider();
}
public void RestoreHealth(int _healthToAdd)
{
currentHealth += _healthToAdd;
setSlider();
}
void setSlider()
{
//clamp current value
currentHealth = Mathf.Clamp(currentHealth, 0, maxHealth);
//find new slider value
float sliderValue = 0;
sliderValue = currentHealth / maxHealth;
_healthBar.value = sliderValue;
}
private void Update()
{
if (target != null)
transform.LookAt(target, Vector3.down);
}
}

/UOP1_Project/Assets/Prefabs/UI/WIP/UIHealthbar.prefab.meta → /UOP1_Project/Assets/WIP/UI/UIHealtDisplay.prefab.meta

/UOP1_Project/Assets/Scripts/UI/UIHealthBarManager.cs.meta → /UOP1_Project/Assets/WIP/UI/UIHealthBarManager.cs.meta

正在加载...
取消
保存