Skip to content

Commit d21bebe

Browse files
committed
Add healthbar
1 parent b40ad32 commit d21bebe

35 files changed

+2574
-781
lines changed

UOP1_Project/Assets/Prefabs/Characters/PigChef.prefab

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,9 @@ MonoBehaviour:
212212
_getHitEffectSO: {fileID: 11400000, guid: 670b8ed8d060e674aa8c90b1187ea592, type: 2}
213213
_mainMeshRenderer: {fileID: 2643181883930254223}
214214
_droppableRewardSO: {fileID: 11400000, guid: f155590e3f62ce94ea050caa8fd5403e, type: 2}
215+
_setHealthBar: {fileID: 11400000, guid: 22e3f27f002de44b4948988138dd9377, type: 2}
216+
_inflictDamage: {fileID: 11400000, guid: be921b398c68d450e9e3c55dde697149, type: 2}
217+
_restoreHealth: {fileID: 11400000, guid: de4a39f85969d44cba990125224ff7ef, type: 2}
215218
--- !u!114 &3326384532942868502
216219
MonoBehaviour:
217220
m_ObjectHideFlags: 0

UOP1_Project/Assets/Prefabs/UI/GameplayScene/Inventory/InspectorDescription.prefab

Lines changed: 150 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ RectTransform:
3131
m_LocalScale: {x: 1, y: 1, z: 1}
3232
m_Children: []
3333
m_Father: {fileID: 7245790260144332786}
34-
m_RootOrder: 1
34+
m_RootOrder: 2
3535
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
3636
m_AnchorMin: {x: 0, y: 0}
37-
m_AnchorMax: {x: 1, y: 0.7}
38-
m_AnchoredPosition: {x: 20, y: -20}
39-
m_SizeDelta: {x: -40, y: -40}
37+
m_AnchorMax: {x: 1, y: 0.65}
38+
m_AnchoredPosition: {x: 5, y: -5}
39+
m_SizeDelta: {x: -10, y: -10}
4040
m_Pivot: {x: 0, y: 1}
4141
--- !u!222 &1123360592060878086
4242
CanvasRenderer:
@@ -61,6 +61,7 @@ MonoBehaviour:
6161
m_Material: {fileID: 0}
6262
m_Color: {r: 1, g: 1, b: 1, a: 1}
6363
m_RaycastTarget: 1
64+
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
6465
m_Maskable: 1
6566
m_OnCullStateChanged:
6667
m_PersistentCalls:
@@ -154,11 +155,13 @@ MonoBehaviour:
154155
m_KeyId: 214189465600
155156
m_Key:
156157
m_FallbackState: 0
158+
m_WaitForCompletion: 1
157159
m_FormatArguments: []
158160
m_UpdateString:
159161
m_PersistentCalls:
160162
m_Calls:
161163
- m_Target: {fileID: 7385809990148588569}
164+
m_TargetAssemblyTypeName:
162165
m_MethodName: set_text
163166
m_Mode: 0
164167
m_Arguments:
@@ -169,6 +172,141 @@ MonoBehaviour:
169172
m_StringArgument:
170173
m_BoolArgument: 0
171174
m_CallState: 2
175+
--- !u!1 &6594678008206670640
176+
GameObject:
177+
m_ObjectHideFlags: 0
178+
m_CorrespondingSourceObject: {fileID: 0}
179+
m_PrefabInstance: {fileID: 0}
180+
m_PrefabAsset: {fileID: 0}
181+
serializedVersion: 6
182+
m_Component:
183+
- component: {fileID: 2120205384012589996}
184+
- component: {fileID: 5693610064118125124}
185+
- component: {fileID: 1087556658047082689}
186+
m_Layer: 5
187+
m_Name: ItemHealthRestoration
188+
m_TagString: Untagged
189+
m_Icon: {fileID: 0}
190+
m_NavMeshLayer: 0
191+
m_StaticEditorFlags: 0
192+
m_IsActive: 1
193+
--- !u!224 &2120205384012589996
194+
RectTransform:
195+
m_ObjectHideFlags: 0
196+
m_CorrespondingSourceObject: {fileID: 0}
197+
m_PrefabInstance: {fileID: 0}
198+
m_PrefabAsset: {fileID: 0}
199+
m_GameObject: {fileID: 6594678008206670640}
200+
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
201+
m_LocalPosition: {x: 0, y: 0, z: 0}
202+
m_LocalScale: {x: 1, y: 1, z: 1}
203+
m_Children: []
204+
m_Father: {fileID: 7245790260144332786}
205+
m_RootOrder: 1
206+
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
207+
m_AnchorMin: {x: 0, y: 0.65}
208+
m_AnchorMax: {x: 1, y: 0.8}
209+
m_AnchoredPosition: {x: 5, y: -5}
210+
m_SizeDelta: {x: -10, y: -10}
211+
m_Pivot: {x: 0, y: 1}
212+
--- !u!222 &5693610064118125124
213+
CanvasRenderer:
214+
m_ObjectHideFlags: 0
215+
m_CorrespondingSourceObject: {fileID: 0}
216+
m_PrefabInstance: {fileID: 0}
217+
m_PrefabAsset: {fileID: 0}
218+
m_GameObject: {fileID: 6594678008206670640}
219+
m_CullTransparentMesh: 0
220+
--- !u!114 &1087556658047082689
221+
MonoBehaviour:
222+
m_ObjectHideFlags: 0
223+
m_CorrespondingSourceObject: {fileID: 0}
224+
m_PrefabInstance: {fileID: 0}
225+
m_PrefabAsset: {fileID: 0}
226+
m_GameObject: {fileID: 6594678008206670640}
227+
m_Enabled: 1
228+
m_EditorHideFlags: 0
229+
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
230+
m_Name:
231+
m_EditorClassIdentifier:
232+
m_Material: {fileID: 0}
233+
m_Color: {r: 1, g: 1, b: 1, a: 1}
234+
m_RaycastTarget: 1
235+
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
236+
m_Maskable: 1
237+
m_OnCullStateChanged:
238+
m_PersistentCalls:
239+
m_Calls: []
240+
m_text: +4
241+
m_isRightToLeft: 0
242+
m_fontAsset: {fileID: 11400000, guid: fe129390af88b40faa85c89db6820ea6, type: 2}
243+
m_sharedMaterial: {fileID: -5592514773993622969, guid: fe129390af88b40faa85c89db6820ea6,
244+
type: 2}
245+
m_fontSharedMaterials: []
246+
m_fontMaterial: {fileID: 0}
247+
m_fontMaterials: []
248+
m_fontColor32:
249+
serializedVersion: 2
250+
rgba: 4278238211
251+
m_fontColor: {r: 0.012705458, g: 0.735849, b: 0, a: 1}
252+
m_enableVertexGradient: 0
253+
m_colorMode: 3
254+
m_fontColorGradient:
255+
topLeft: {r: 1, g: 1, b: 1, a: 1}
256+
topRight: {r: 1, g: 1, b: 1, a: 1}
257+
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
258+
bottomRight: {r: 1, g: 1, b: 1, a: 1}
259+
m_fontColorGradientPreset: {fileID: 0}
260+
m_spriteAsset: {fileID: 0}
261+
m_tintAllSprites: 0
262+
m_StyleSheet: {fileID: 0}
263+
m_TextStyleHashCode: -1183493901
264+
m_overrideHtmlColors: 0
265+
m_faceColor:
266+
serializedVersion: 2
267+
rgba: 4294967295
268+
m_fontSize: 36.35
269+
m_fontSizeBase: 60
270+
m_fontWeight: 400
271+
m_enableAutoSizing: 1
272+
m_fontSizeMin: 18
273+
m_fontSizeMax: 60
274+
m_fontStyle: 1
275+
m_HorizontalAlignment: 1
276+
m_VerticalAlignment: 512
277+
m_textAlignment: 65535
278+
m_characterSpacing: 0
279+
m_wordSpacing: 0
280+
m_lineSpacing: 0
281+
m_lineSpacingMax: 0
282+
m_paragraphSpacing: 0
283+
m_charWidthMaxAdj: 0
284+
m_enableWordWrapping: 1
285+
m_wordWrappingRatios: 0.4
286+
m_overflowMode: 0
287+
m_linkedTextComponent: {fileID: 0}
288+
parentLinkedComponent: {fileID: 0}
289+
m_enableKerning: 1
290+
m_enableExtraPadding: 0
291+
checkPaddingRequired: 0
292+
m_isRichText: 1
293+
m_parseCtrlCharacters: 1
294+
m_isOrthographic: 1
295+
m_isCullingEnabled: 0
296+
m_horizontalMapping: 0
297+
m_verticalMapping: 0
298+
m_uvLineOffset: 0
299+
m_geometrySortingOrder: 0
300+
m_IsTextObjectScaleStatic: 0
301+
m_VertexBufferAutoSizeReduction: 1
302+
m_useMaxVisibleDescender: 1
303+
m_pageToDisplay: 1
304+
m_margin: {x: 0, y: 0, z: 0, w: 0}
305+
m_isUsingLegacyAnimationComponent: 0
306+
m_isVolumetricText: 0
307+
m_hasFontAssetChanged: 0
308+
m_baseMaterial: {fileID: 0}
309+
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
172310
--- !u!1 &7245790260144332787
173311
GameObject:
174312
m_ObjectHideFlags: 0
@@ -199,6 +337,7 @@ RectTransform:
199337
m_LocalScale: {x: 1, y: 1, z: 1}
200338
m_Children:
201339
- {fileID: 8834273132554460262}
340+
- {fileID: 2120205384012589996}
202341
- {fileID: 3777696776119279873}
203342
m_Father: {fileID: 0}
204343
m_RootOrder: 0
@@ -229,6 +368,7 @@ MonoBehaviour:
229368
m_Name:
230369
m_EditorClassIdentifier:
231370
_textDescription: {fileID: 6885412833861187076}
371+
_textHealthRestoration: {fileID: 1087556658047082689}
232372
_textName: {fileID: 2752258931120570592}
233373
--- !u!1 &7838963858336025709
234374
GameObject:
@@ -263,10 +403,10 @@ RectTransform:
263403
m_Father: {fileID: 7245790260144332786}
264404
m_RootOrder: 0
265405
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
266-
m_AnchorMin: {x: 0, y: 0.7}
406+
m_AnchorMin: {x: 0, y: 0.8}
267407
m_AnchorMax: {x: 1, y: 1}
268-
m_AnchoredPosition: {x: 20, y: -20}
269-
m_SizeDelta: {x: -40, y: -40}
408+
m_AnchoredPosition: {x: 5, y: -5}
409+
m_SizeDelta: {x: -10, y: -10}
270410
m_Pivot: {x: 0, y: 1}
271411
--- !u!222 &299233528088385264
272412
CanvasRenderer:
@@ -291,6 +431,7 @@ MonoBehaviour:
291431
m_Material: {fileID: 0}
292432
m_Color: {r: 1, g: 1, b: 1, a: 1}
293433
m_RaycastTarget: 1
434+
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
294435
m_Maskable: 1
295436
m_OnCullStateChanged:
296437
m_PersistentCalls:
@@ -384,11 +525,13 @@ MonoBehaviour:
384525
m_KeyId: 214189465600
385526
m_Key:
386527
m_FallbackState: 0
528+
m_WaitForCompletion: 1
387529
m_FormatArguments: []
388530
m_UpdateString:
389531
m_PersistentCalls:
390532
m_Calls:
391533
- m_Target: {fileID: 5418752264980940646}
534+
m_TargetAssemblyTypeName:
392535
m_MethodName: set_text
393536
m_Mode: 0
394537
m_Arguments:

UOP1_Project/Assets/Prefabs/UI/GameplayScene/Inventory/InspectorIngredient.prefab

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ PrefabInstance:
7878
- target: {fileID: 984266489814165861, guid: 5871d3b5d4307434e9d7011de3208d9b,
7979
type: 3}
8080
propertyPath: m_fontSize
81-
value: 49.65
81+
value: 40
8282
objectReference: {fileID: 0}
8383
- target: {fileID: 3580764855277917574, guid: 5871d3b5d4307434e9d7011de3208d9b,
8484
type: 3}
@@ -225,7 +225,7 @@ PrefabInstance:
225225
- target: {fileID: 984266489814165861, guid: 5871d3b5d4307434e9d7011de3208d9b,
226226
type: 3}
227227
propertyPath: m_fontSize
228-
value: 49.65
228+
value: 40
229229
objectReference: {fileID: 0}
230230
- target: {fileID: 3580764855277917574, guid: 5871d3b5d4307434e9d7011de3208d9b,
231231
type: 3}
@@ -372,7 +372,7 @@ PrefabInstance:
372372
- target: {fileID: 984266489814165861, guid: 5871d3b5d4307434e9d7011de3208d9b,
373373
type: 3}
374374
propertyPath: m_fontSize
375-
value: 49.65
375+
value: 40
376376
objectReference: {fileID: 0}
377377
- target: {fileID: 3580764855277917574, guid: 5871d3b5d4307434e9d7011de3208d9b,
378378
type: 3}
@@ -519,7 +519,7 @@ PrefabInstance:
519519
- target: {fileID: 984266489814165861, guid: 5871d3b5d4307434e9d7011de3208d9b,
520520
type: 3}
521521
propertyPath: m_fontSize
522-
value: 49.65
522+
value: 40
523523
objectReference: {fileID: 0}
524524
- target: {fileID: 3580764855277917574, guid: 5871d3b5d4307434e9d7011de3208d9b,
525525
type: 3}
@@ -666,7 +666,7 @@ PrefabInstance:
666666
- target: {fileID: 984266489814165861, guid: 5871d3b5d4307434e9d7011de3208d9b,
667667
type: 3}
668668
propertyPath: m_fontSize
669-
value: 49.65
669+
value: 40
670670
objectReference: {fileID: 0}
671671
- target: {fileID: 3580764855277917574, guid: 5871d3b5d4307434e9d7011de3208d9b,
672672
type: 3}

UOP1_Project/Assets/Prefabs/UI/GameplayScene/Inventory/Inventory Inspector.prefab

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -310,21 +310,6 @@ PrefabInstance:
310310
m_Modification:
311311
m_TransformParent: {fileID: 6561198984233327144}
312312
m_Modifications:
313-
- target: {fileID: 2752258931120570592, guid: fca99b3d000214a42a6c17cebaa4fffb,
314-
type: 3}
315-
propertyPath: m_UpdateString.m_PersistentCalls.m_Calls.Array.data[0].m_TargetAssemblyTypeName
316-
value: TMPro.TextMeshProUGUI, Unity.TextMeshPro
317-
objectReference: {fileID: 0}
318-
- target: {fileID: 5418752264980940646, guid: fca99b3d000214a42a6c17cebaa4fffb,
319-
type: 3}
320-
propertyPath: m_text
321-
value: No translation found for 'New Entry' in Scene Names
322-
objectReference: {fileID: 0}
323-
- target: {fileID: 6885412833861187076, guid: fca99b3d000214a42a6c17cebaa4fffb,
324-
type: 3}
325-
propertyPath: m_UpdateString.m_PersistentCalls.m_Calls.Array.data[0].m_TargetAssemblyTypeName
326-
value: TMPro.TextMeshProUGUI, Unity.TextMeshPro
327-
objectReference: {fileID: 0}
328313
- target: {fileID: 7245790260144332786, guid: fca99b3d000214a42a6c17cebaa4fffb,
329314
type: 3}
330315
propertyPath: m_Pivot.x
@@ -435,11 +420,6 @@ PrefabInstance:
435420
propertyPath: m_Name
436421
value: Panel Description
437422
objectReference: {fileID: 0}
438-
- target: {fileID: 7385809990148588569, guid: fca99b3d000214a42a6c17cebaa4fffb,
439-
type: 3}
440-
propertyPath: m_text
441-
value: No translation found for 'New Entry' in Scene Names
442-
objectReference: {fileID: 0}
443423
m_RemovedComponents: []
444424
m_SourcePrefab: {fileID: 100100000, guid: fca99b3d000214a42a6c17cebaa4fffb, type: 3}
445425
--- !u!224 &7499314617765273574 stripped
@@ -467,11 +447,6 @@ PrefabInstance:
467447
m_Modification:
468448
m_TransformParent: {fileID: 6561198984233327144}
469449
m_Modifications:
470-
- target: {fileID: 182579719192307743, guid: 87ec0c6e99b114ddb9aec2a692e59eb1,
471-
type: 3}
472-
propertyPath: m_fontSize
473-
value: 40
474-
objectReference: {fileID: 0}
475450
- target: {fileID: 3034287907056664876, guid: 87ec0c6e99b114ddb9aec2a692e59eb1,
476451
type: 3}
477452
propertyPath: m_Name
@@ -582,26 +557,6 @@ PrefabInstance:
582557
propertyPath: m_LocalEulerAnglesHint.z
583558
value: 0
584559
objectReference: {fileID: 0}
585-
- target: {fileID: 8215832079168058909, guid: 87ec0c6e99b114ddb9aec2a692e59eb1,
586-
type: 3}
587-
propertyPath: m_fontSize
588-
value: 40
589-
objectReference: {fileID: 0}
590-
- target: {fileID: 8455856483180760525, guid: 87ec0c6e99b114ddb9aec2a692e59eb1,
591-
type: 3}
592-
propertyPath: m_fontSize
593-
value: 40
594-
objectReference: {fileID: 0}
595-
- target: {fileID: 8568070460212521712, guid: 87ec0c6e99b114ddb9aec2a692e59eb1,
596-
type: 3}
597-
propertyPath: m_fontSize
598-
value: 40
599-
objectReference: {fileID: 0}
600-
- target: {fileID: 8606465720654680797, guid: 87ec0c6e99b114ddb9aec2a692e59eb1,
601-
type: 3}
602-
propertyPath: m_fontSize
603-
value: 40
604-
objectReference: {fileID: 0}
605560
m_RemovedComponents: []
606561
m_SourcePrefab: {fileID: 100100000, guid: 87ec0c6e99b114ddb9aec2a692e59eb1, type: 3}
607562
--- !u!224 &1310611228648264730 stripped

0 commit comments

Comments
 (0)