Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved HealthHUD and damage popup feedback #905

Merged
merged 2 commits into from
Dec 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
132 changes: 132 additions & 0 deletions Assets/Materials/UI/HealthBar.mat
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: HealthBar
m_Shader: {fileID: -6465566751694194690, guid: f7ecd39441a849e4d87870dcd5428b65, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BaseMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SpecGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_Lightmaps:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_LightmapsInd:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_ShadowMasks:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _AlphaClip: 0
- _AlphaToMask: 0
- _Blend: 0
- _BlendModePreserveSpecular: 1
- _BumpScale: 1
- _ClearCoatMask: 0
- _ClearCoatSmoothness: 0
- _Cull: 2
- _Cutoff: 0.5
- _DetailAlbedoMapScale: 1
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _DstBlendAlpha: 0
- _EnvironmentReflections: 1
- _GlossMapScale: 0
- _Glossiness: 0
- _GlossyReflections: 0
- _Metallic: 0
- _OcclusionStrength: 1
- _Parallax: 0.005
- _QueueOffset: 0
- _ReceiveShadows: 1
- _Smoothness: 0.5
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SrcBlendAlpha: 1
- _Surface: 0
- _WorkflowMode: 1
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []
--- !u!114 &6404493371688589894
MonoBehaviour:
m_ObjectHideFlags: 11
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name:
m_EditorClassIdentifier:
version: 7
8 changes: 8 additions & 0 deletions Assets/Materials/UI/HealthBar.mat.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 9 additions & 1 deletion Assets/Prefabs/Input/NetworkPlayer.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,14 @@ PrefabInstance:
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6721764986224867716, guid: 2872a05bf8e94d541a70726bb35085f3, type: 3}
propertyPath: m_RenderingLayerMask
value: 4
objectReference: {fileID: 0}
- target: {fileID: 8325376438412411157, guid: 2872a05bf8e94d541a70726bb35085f3, type: 3}
propertyPath: m_Materials.Array.data[0]
value:
objectReference: {fileID: 2100000, guid: 0ae925ac9e062854c9254d87fa608379, type: 2}
- target: {fileID: 8692423856261334150, guid: 2872a05bf8e94d541a70726bb35085f3, type: 3}
propertyPath: _assetId
value: 3821175277
Expand Down Expand Up @@ -167,13 +175,13 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 7fa6481de280fb5489fa0e0e0d7a7026, type: 3}
m_Name:
m_EditorClassIdentifier:
id: 0
color: {r: 0, g: 0, b: 0, a: 0}
playerName:
isAI: 0
body: {fileID: 0}
barrel: {fileID: 0}
extension: {fileID: 0}
id: 0
--- !u!95 &3043983234383150226 stripped
Animator:
m_CorrespondingSourceObject: {fileID: 3755527737191155748, guid: 2872a05bf8e94d541a70726bb35085f3, type: 3}
Expand Down
23 changes: 21 additions & 2 deletions Assets/Prefabs/Input/Player.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
damagePopup: {fileID: 3456343568974069144, guid: 216963e07a2087cc99a5e9c4e6b0454e, type: 3}
healthController: {fileID: 0}
isOwnerOnly: 0
--- !u!114 &8692423856261334150
MonoBehaviour:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -1552,6 +1554,7 @@ GameObject:
- component: {fileID: 8513528357214213258}
- component: {fileID: 1876285937171696916}
- component: {fileID: 2367956686065937511}
- component: {fileID: 8639708736638023490}
m_Layer: 5
m_Name: HealthHud
m_TagString: Untagged
Expand Down Expand Up @@ -1641,6 +1644,21 @@ SpriteRenderer:
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0
--- !u!114 &8639708736638023490
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3099507315220960622}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 8df77ee5e94e96a21a1c251683e0d3a7, type: 3}
m_Name:
m_EditorClassIdentifier:
damagePopup: {fileID: 3456343568974069144, guid: 5c078cb9f2f563048a6541bfcea977b9, type: 3}
healthController: {fileID: 6717855691676836013}
isOwnerOnly: 1
--- !u!1 &3124495339848130259
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -1723,6 +1741,7 @@ MonoBehaviour:
spectatorTargetText: {fileID: 5857550089673397807}
damageBorderFlashDuration: 0.2
popupSpammer: {fileID: 6535424167945181997}
damagePopupEmitter: {fileID: 0}
speedLines: {fileID: 1712702864845135441}
speedLineEase:
serializedVersion: 2
Expand Down Expand Up @@ -3431,10 +3450,10 @@ SpriteRenderer:
m_ReflectionProbeUsage: 1
m_RayTracingMode: 0
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RenderingLayerMask: 4
m_RendererPriority: 0
m_Materials:
- {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 2100000, guid: 0ae925ac9e062854c9254d87fa608379, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
Expand Down
22 changes: 16 additions & 6 deletions Assets/Prefabs/UI/DamagePopup.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ GameObject:
- component: {fileID: 3748194351601288369}
- component: {fileID: 2158285029245345615}
- component: {fileID: 3456343568974069144}
- component: {fileID: 7565649562838582493}
m_Layer: 5
m_Name: DamagePopup
m_TagString: Untagged
Expand Down Expand Up @@ -75,12 +76,21 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
label: {fileID: 3771122092874266332}
lowDamage: 10
highDamage: 70
normalLowColor: {r: 1, g: 1, b: 1, a: 1}
normalHighColor: {r: 0.94509804, g: 0.9032764, b: 0.45098042, a: 1}
criticalLowColor: {r: 0.6344173, g: 0.9716981, b: 0.55460125, a: 1}
criticalHighColor: {r: 0.22903016, g: 0.8301887, b: 0.08223567, a: 1}
scaleMultiplier: 2
isHUD: 0
--- !u!114 &7565649562838582493
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2974520026730963027}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 7807b6a85c1f6e94daf4d35fe13b530d, type: 3}
m_Name:
m_EditorClassIdentifier:
textMesh: {fileID: 3771122092874266332}
--- !u!1 &7123424410564671507
GameObject:
m_ObjectHideFlags: 0
Expand Down
Loading