From 6165ad4dba3f142e409ae205d4c5e445a2752e62 Mon Sep 17 00:00:00 2001 From: djkellerman Date: Fri, 18 Apr 2025 19:13:04 -0400 Subject: [PATCH] adjusted help button to work on all screen sizes --- .../Title Screen/Title Animation.anim | 200 +++++++++--------- Assets/Scenes/Title Screen.unity | 20 +- Assets/Scripts/Player/Damageable.cs | 5 - 3 files changed, 110 insertions(+), 115 deletions(-) diff --git a/Assets/Animations/Title Screen/Title Animation.anim b/Assets/Animations/Title Screen/Title Animation.anim index 962a048..d16816a 100644 --- a/Assets/Animations/Title Screen/Title Animation.anim +++ b/Assets/Animations/Title Screen/Title Animation.anim @@ -71,7 +71,7 @@ AnimationClip: m_Curve: - serializedVersion: 3 time: 0 - value: {x: 0, y: 0, z: 225} + value: {x: 0, y: 0, z: 230} inSlope: {x: 0, y: 0, z: 0} outSlope: {x: 0, y: 0, z: 0} tangentMode: 0 @@ -80,15 +80,6 @@ AnimationClip: outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - serializedVersion: 3 time: 0.6666667 - value: {x: 0, y: 0, z: 210} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 0.8333333 value: {x: 0, y: 0, z: 240} inSlope: {x: 0, y: 0, z: 0} outSlope: {x: 0, y: 0, z: 0} @@ -96,9 +87,18 @@ AnimationClip: weightedMode: 0 inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 0.8333333 + value: {x: 0, y: 0, z: 220} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - serializedVersion: 3 time: 1 - value: {x: 0, y: 0, z: 225} + value: {x: 0, y: 0, z: 230} inSlope: {x: 0, y: 0, z: 0} outSlope: {x: 0, y: 0, z: 0} tangentMode: 0 @@ -108,7 +108,7 @@ AnimationClip: m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 - path: Pentagon/HelpButton + path: Text/HelpButton m_PositionCurves: [] m_ScaleCurves: [] m_FloatCurves: @@ -298,7 +298,7 @@ AnimationClip: m_Curve: - serializedVersion: 3 time: 0 - value: -18 + value: -60 inSlope: 0 outSlope: 0 tangentMode: 136 @@ -306,8 +306,8 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.75 - value: -9.46 + time: 0.6666667 + value: -55.73 inSlope: 0 outSlope: 0 tangentMode: 136 @@ -318,7 +318,7 @@ AnimationClip: m_PostInfinity: 2 m_RotationOrder: 4 attribute: m_AnchoredPosition.x - path: Pentagon/HelpButton + path: Text/HelpButton classID: 224 script: {fileID: 0} flags: 0 @@ -328,7 +328,7 @@ AnimationClip: m_Curve: - serializedVersion: 3 time: 0 - value: 45 + value: 85 inSlope: 0 outSlope: 0 tangentMode: 136 @@ -336,8 +336,8 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.75 - value: 28.78 + time: 0.6666667 + value: 65.44 inSlope: 0 outSlope: 0 tangentMode: 136 @@ -348,7 +348,7 @@ AnimationClip: m_PostInfinity: 2 m_RotationOrder: 4 attribute: m_AnchoredPosition.y - path: Pentagon/HelpButton + path: Text/HelpButton classID: 224 script: {fileID: 0} flags: 0 @@ -370,7 +370,7 @@ AnimationClip: isIntCurve: 0 isSerializeReferenceCurve: 0 - serializedVersion: 2 - path: 761887162 + path: 1967842121 attribute: 4 script: {fileID: 0} typeID: 4 @@ -433,7 +433,7 @@ AnimationClip: isIntCurve: 0 isSerializeReferenceCurve: 0 - serializedVersion: 2 - path: 761887162 + path: 1967842121 attribute: 1460864421 script: {fileID: 0} typeID: 224 @@ -442,7 +442,7 @@ AnimationClip: isIntCurve: 0 isSerializeReferenceCurve: 0 - serializedVersion: 2 - path: 761887162 + path: 1967842121 attribute: 538195251 script: {fileID: 0} typeID: 224 @@ -823,6 +823,66 @@ AnimationClip: classID: 224 script: {fileID: 0} flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: -60 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.6666667 + value: -55.73 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_AnchoredPosition.x + path: Text/HelpButton + classID: 224 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 85 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.6666667 + value: 65.44 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_AnchoredPosition.y + path: Text/HelpButton + classID: 224 + script: {fileID: 0} + flags: 0 - serializedVersion: 2 curve: serializedVersion: 2 @@ -867,7 +927,7 @@ AnimationClip: m_PostInfinity: 2 m_RotationOrder: 4 attribute: localEulerAnglesRaw.x - path: Pentagon/HelpButton + path: Text/HelpButton classID: 224 script: {fileID: 0} flags: 0 @@ -915,7 +975,7 @@ AnimationClip: m_PostInfinity: 2 m_RotationOrder: 4 attribute: localEulerAnglesRaw.y - path: Pentagon/HelpButton + path: Text/HelpButton classID: 224 script: {fileID: 0} flags: 0 @@ -925,7 +985,7 @@ AnimationClip: m_Curve: - serializedVersion: 3 time: 0 - value: 225 + value: 230 inSlope: 0 outSlope: 0 tangentMode: 136 @@ -934,15 +994,6 @@ AnimationClip: outWeight: 0.33333334 - serializedVersion: 3 time: 0.6666667 - value: 210 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.8333333 value: 240 inSlope: 0 outSlope: 0 @@ -950,9 +1001,18 @@ AnimationClip: weightedMode: 0 inWeight: 0.33333334 outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.8333333 + value: 220 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 - serializedVersion: 3 time: 1 - value: 225 + value: 230 inSlope: 0 outSlope: 0 tangentMode: 136 @@ -963,67 +1023,7 @@ AnimationClip: m_PostInfinity: 2 m_RotationOrder: 4 attribute: localEulerAnglesRaw.z - path: Pentagon/HelpButton - classID: 224 - script: {fileID: 0} - flags: 0 - - serializedVersion: 2 - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: -18 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.75 - value: -9.46 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_AnchoredPosition.x - path: Pentagon/HelpButton - classID: 224 - script: {fileID: 0} - flags: 0 - - serializedVersion: 2 - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: 45 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.75 - value: 28.78 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_AnchoredPosition.y - path: Pentagon/HelpButton + path: Text/HelpButton classID: 224 script: {fileID: 0} flags: 0 @@ -1072,7 +1072,7 @@ AnimationClip: m_PostInfinity: 2 m_RotationOrder: 4 attribute: m_LocalEulerAngles.x - path: Pentagon/HelpButton + path: Text/HelpButton classID: 224 script: {fileID: 0} flags: 0 @@ -1084,7 +1084,7 @@ AnimationClip: m_PostInfinity: 2 m_RotationOrder: 4 attribute: m_LocalEulerAngles.y - path: Pentagon/HelpButton + path: Text/HelpButton classID: 224 script: {fileID: 0} flags: 0 @@ -1096,7 +1096,7 @@ AnimationClip: m_PostInfinity: 2 m_RotationOrder: 4 attribute: m_LocalEulerAngles.z - path: Pentagon/HelpButton + path: Text/HelpButton classID: 224 script: {fileID: 0} flags: 0 diff --git a/Assets/Scenes/Title Screen.unity b/Assets/Scenes/Title Screen.unity index 7c338a0..db8c5e0 100644 --- a/Assets/Scenes/Title Screen.unity +++ b/Assets/Scenes/Title Screen.unity @@ -1948,18 +1948,18 @@ RectTransform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 382603853} - m_LocalRotation: {x: 0, y: -0, z: 0.9238796, w: -0.38268325} + m_LocalRotation: {x: 0, y: -0, z: 0.9063079, w: -0.42261827} m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 0.06000246, y: 0.06000246, z: 1} + m_LocalScale: {x: 0.112770975, y: 0.112770975, z: 1.8794389} m_ConstrainProportionsScale: 0 m_Children: - {fileID: 1525394606} - {fileID: 1055145214} - m_Father: {fileID: 704873500} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 225} + m_Father: {fileID: 488642363} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 230} m_AnchorMin: {x: 1, y: 0} m_AnchorMax: {x: 1, y: 0} - m_AnchoredPosition: {x: -9.41, y: 28.47} + m_AnchoredPosition: {x: -55.73, y: 65.44} m_SizeDelta: {x: 53, y: 53} m_Pivot: {x: 0.5, y: 0.5} --- !u!95 &382603855 @@ -2509,6 +2509,7 @@ RectTransform: m_LocalScale: {x: 45.5, y: 45.5, z: 45.5} m_ConstrainProportionsScale: 0 m_Children: + - {fileID: 382603854} - {fileID: 1845854392} - {fileID: 330396140} m_Father: {fileID: 365391918} @@ -3039,7 +3040,6 @@ RectTransform: - {fileID: 435822016} - {fileID: 923954520} - {fileID: 134746056} - - {fileID: 382603854} - {fileID: 1227248456} m_Father: {fileID: 365391918} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} @@ -3155,7 +3155,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!224 &857059814 RectTransform: m_ObjectHideFlags: 0 @@ -5286,7 +5286,7 @@ RectTransform: m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} m_AnchoredPosition: {x: 0, y: -50} - m_SizeDelta: {x: 1200, y: 550} + m_SizeDelta: {x: 1000, y: 425} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1777260748 MonoBehaviour: @@ -5603,7 +5603,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: 458, y: 262} + m_AnchoredPosition: {x: 450, y: 220} m_SizeDelta: {x: 200, y: 50} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1867627312 @@ -6225,7 +6225,7 @@ RectTransform: m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 650, y: 2500} + m_SizeDelta: {x: 800, y: 2520} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &2055185872 MonoBehaviour: diff --git a/Assets/Scripts/Player/Damageable.cs b/Assets/Scripts/Player/Damageable.cs index d9daf1a..01faae9 100644 --- a/Assets/Scripts/Player/Damageable.cs +++ b/Assets/Scripts/Player/Damageable.cs @@ -46,11 +46,6 @@ namespace Player /// public bool dying = false; - /// - /// Event triggered when the player is punched. - /// - public event System.Action OnPlayerPunched; - /// /// Event triggered when a player dies. ///