From 2ba5ec8d32f773a402e0d416a55459d12dd22f18 Mon Sep 17 00:00:00 2001 From: Syntriax Date: Sat, 26 Feb 2022 16:48:44 +0300 Subject: [PATCH] Player On Wall Animation Added --- Assets/Animations/Player/OnWall.anim | 53 ++++++ Assets/Animations/Player/OnWall.anim.meta | 8 + Assets/Scripts/Player/PlayerController.cs | 3 + Assets/Sprites/Player/Player.aseprite | Bin 3944 -> 4782 bytes Assets/Sprites/Player/Player.png | Bin 1561 -> 1852 bytes Assets/Sprites/Player/Player.png.meta | 222 ++++++++++++++++++---- 6 files changed, 252 insertions(+), 34 deletions(-) create mode 100644 Assets/Animations/Player/OnWall.anim create mode 100644 Assets/Animations/Player/OnWall.anim.meta diff --git a/Assets/Animations/Player/OnWall.anim b/Assets/Animations/Player/OnWall.anim new file mode 100644 index 0000000..143f087 --- /dev/null +++ b/Assets/Animations/Player/OnWall.anim @@ -0,0 +1,53 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!74 &7400000 +AnimationClip: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: OnWall + serializedVersion: 6 + m_Legacy: 0 + m_Compressed: 0 + m_UseHighQualityCurve: 1 + m_RotationCurves: [] + m_CompressedRotationCurves: [] + m_EulerCurves: [] + m_PositionCurves: [] + m_ScaleCurves: [] + m_FloatCurves: [] + m_PPtrCurves: [] + m_SampleRate: 60 + m_WrapMode: 0 + m_Bounds: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_ClipBindingConstant: + genericBindings: [] + pptrCurveMapping: [] + m_AnimationClipSettings: + serializedVersion: 2 + m_AdditiveReferencePoseClip: {fileID: 0} + m_AdditiveReferencePoseTime: 0 + m_StartTime: 0 + m_StopTime: 1 + m_OrientationOffsetY: 0 + m_Level: 0 + m_CycleOffset: 0 + m_HasAdditiveReferencePose: 0 + m_LoopTime: 1 + m_LoopBlend: 0 + m_LoopBlendOrientation: 0 + m_LoopBlendPositionY: 0 + m_LoopBlendPositionXZ: 0 + m_KeepOriginalOrientation: 0 + m_KeepOriginalPositionY: 1 + m_KeepOriginalPositionXZ: 0 + m_HeightFromFeet: 0 + m_Mirror: 0 + m_EditorCurves: [] + m_EulerEditorCurves: [] + m_HasGenericRootTransform: 0 + m_HasMotionFloatCurves: 0 + m_Events: [] diff --git a/Assets/Animations/Player/OnWall.anim.meta b/Assets/Animations/Player/OnWall.anim.meta new file mode 100644 index 0000000..b0afc00 --- /dev/null +++ b/Assets/Animations/Player/OnWall.anim.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b40c9e52b72cda847a456f33b2c9cccf +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 7400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Player/PlayerController.cs b/Assets/Scripts/Player/PlayerController.cs index 9219771..0a6575b 100644 --- a/Assets/Scripts/Player/PlayerController.cs +++ b/Assets/Scripts/Player/PlayerController.cs @@ -47,6 +47,7 @@ namespace Player private const string IsMovingParameter = "IsMoving"; private const string IsGroundedParameter = "IsGrounded"; + private const string IsWalledParameter = "IsWalled"; private Animator animator = null; private void Awake() @@ -115,7 +116,9 @@ namespace Player _playerRigidbody2D.velocity = new Vector2(0.0f, _playerRigidbody2D.velocity.y); animator.SetBool(IsMovingParameter, false); } + animator.SetBool(IsGroundedParameter, _playerGroundTrigger.IsCollided); + animator.SetBool(IsWalledParameter, _playerWallTriggerLeft.IsCollided || _playerWallTriggerRight.IsCollided); if (_jumpKeyPressed && _playerGroundTrigger.IsCollided && _canJump) Jump(); diff --git a/Assets/Sprites/Player/Player.aseprite b/Assets/Sprites/Player/Player.aseprite index 5d4968c36355fac200ac6ffc03af8ca5c5be8b86..03a796d45ac204621f31525484cd2b010153ded7 100644 GIT binary patch delta 1013 zcmaDMw@#IPoe%@VgQZdv*(;g8F)nOkte?ohz#yT(3M65G4aR`b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^s*J;ZUdsk z+sw$j>dVa<83Uk6#YgPu7z2sA|D(MFW%BvgW%}sL%^DeNtaglDx*Z>Jrz5Gs2_z#! zg#L3#0RVQhmyMI(?|Q_J&~u>r!VJ`d4Fkj~@%^qx-1rZ)k#+xqUk=o200000NkvXX Hu0mjfuJ9EK diff --git a/Assets/Sprites/Player/Player.png.meta b/Assets/Sprites/Player/Player.png.meta index 9111773..0a8dc6d 100644 --- a/Assets/Sprites/Player/Player.png.meta +++ b/Assets/Sprites/Player/Player.png.meta @@ -108,11 +108,11 @@ TextureImporter: rect: serializedVersion: 2 x: 0 - y: 48 + y: 0 width: 16 height: 16 alignment: 0 - pivot: {x: 0.5, y: 0.5} + pivot: {x: 0, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] @@ -129,11 +129,11 @@ TextureImporter: rect: serializedVersion: 2 x: 16 - y: 48 + y: 0 width: 16 height: 16 alignment: 0 - pivot: {x: 0.5, y: 0.5} + pivot: {x: 0, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] @@ -150,11 +150,11 @@ TextureImporter: rect: serializedVersion: 2 x: 32 - y: 48 + y: 0 width: 16 height: 16 alignment: 0 - pivot: {x: 0.5, y: 0.5} + pivot: {x: 0, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] @@ -171,11 +171,11 @@ TextureImporter: rect: serializedVersion: 2 x: 48 - y: 48 + y: 0 width: 16 height: 16 alignment: 0 - pivot: {x: 0.5, y: 0.5} + pivot: {x: 0, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] @@ -192,11 +192,11 @@ TextureImporter: rect: serializedVersion: 2 x: 64 - y: 48 + y: 0 width: 16 height: 16 alignment: 0 - pivot: {x: 0.5, y: 0.5} + pivot: {x: 0, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] @@ -213,7 +213,7 @@ TextureImporter: rect: serializedVersion: 2 x: 80 - y: 48 + y: 0 width: 16 height: 16 alignment: 0 @@ -234,11 +234,11 @@ TextureImporter: rect: serializedVersion: 2 x: 0 - y: 32 + y: 16 width: 16 height: 16 alignment: 0 - pivot: {x: 0.5, y: 0.5} + pivot: {x: 0, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] @@ -255,11 +255,11 @@ TextureImporter: rect: serializedVersion: 2 x: 16 - y: 32 + y: 16 width: 16 height: 16 alignment: 0 - pivot: {x: 0.5, y: 0.5} + pivot: {x: 0, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] @@ -276,11 +276,11 @@ TextureImporter: rect: serializedVersion: 2 x: 32 - y: 32 + y: 16 width: 16 height: 16 alignment: 0 - pivot: {x: 0.5, y: 0.5} + pivot: {x: 0, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] @@ -297,11 +297,11 @@ TextureImporter: rect: serializedVersion: 2 x: 48 - y: 32 + y: 16 width: 16 height: 16 alignment: 0 - pivot: {x: 0.5, y: 0.5} + pivot: {x: 0, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] @@ -318,11 +318,11 @@ TextureImporter: rect: serializedVersion: 2 x: 64 - y: 32 + y: 16 width: 16 height: 16 alignment: 0 - pivot: {x: 0.5, y: 0.5} + pivot: {x: 0, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] @@ -339,11 +339,11 @@ TextureImporter: rect: serializedVersion: 2 x: 80 - y: 32 + y: 16 width: 16 height: 16 alignment: 0 - pivot: {x: 0.5, y: 0.5} + pivot: {x: 0, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] @@ -360,11 +360,11 @@ TextureImporter: rect: serializedVersion: 2 x: 96 - y: 32 + y: 16 width: 16 height: 16 alignment: 0 - pivot: {x: 0.5, y: 0.5} + pivot: {x: 0, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] @@ -381,11 +381,11 @@ TextureImporter: rect: serializedVersion: 2 x: 112 - y: 32 + y: 16 width: 16 height: 16 alignment: 0 - pivot: {x: 0.5, y: 0.5} + pivot: {x: 0, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] @@ -402,11 +402,11 @@ TextureImporter: rect: serializedVersion: 2 x: 128 - y: 32 + y: 16 width: 16 height: 16 alignment: 0 - pivot: {x: 0.5, y: 0.5} + pivot: {x: 0, y: 0} border: {x: 0, y: 0, z: 0, w: 0} outline: [] physicsShape: [] @@ -423,7 +423,7 @@ TextureImporter: rect: serializedVersion: 2 x: 0 - y: 16 + y: 32 width: 16 height: 16 alignment: 0 @@ -444,7 +444,7 @@ TextureImporter: rect: serializedVersion: 2 x: 0 - y: 0 + y: 48 width: 16 height: 16 alignment: 0 @@ -465,7 +465,7 @@ TextureImporter: rect: serializedVersion: 2 x: 16 - y: 0 + y: 48 width: 16 height: 16 alignment: 0 @@ -486,7 +486,7 @@ TextureImporter: rect: serializedVersion: 2 x: 32 - y: 0 + y: 48 width: 16 height: 16 alignment: 0 @@ -507,7 +507,7 @@ TextureImporter: rect: serializedVersion: 2 x: 48 - y: 0 + y: 48 width: 16 height: 16 alignment: 0 @@ -523,6 +523,153 @@ TextureImporter: indices: edges: [] weights: [] + - serializedVersion: 2 + name: Player_20 + rect: + serializedVersion: 2 + x: 0 + y: 64 + width: 16 + height: 16 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: 0 + bones: [] + spriteID: 6fc6db0a69805bd4382de4148302b4c4 + internalID: -2109353353 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: Player_21 + rect: + serializedVersion: 2 + x: 16 + y: 64 + width: 16 + height: 16 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: 0 + bones: [] + spriteID: ea65d534f2c7e5b45aa9a4ea1214efce + internalID: -932523871 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: Player_22 + rect: + serializedVersion: 2 + x: 32 + y: 64 + width: 16 + height: 16 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: 0 + bones: [] + spriteID: 38dd844f938b031488a7758f51dcf6d8 + internalID: 2059507875 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: Player_23 + rect: + serializedVersion: 2 + x: 48 + y: 64 + width: 16 + height: 16 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: 0 + bones: [] + spriteID: 38f17b4ed4142bf419a2e5d39b570278 + internalID: -724040594 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: Player_24 + rect: + serializedVersion: 2 + x: 64 + y: 64 + width: 16 + height: 16 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: 0 + bones: [] + spriteID: 979eac1ed505b2d4f8d571c7d8d5f531 + internalID: -1692090074 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: Player_25 + rect: + serializedVersion: 2 + x: 80 + y: 64 + width: 16 + height: 16 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: 0 + bones: [] + spriteID: 201d191d173fab6409235fe91c8fcf8a + internalID: -2100026830 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: Player_26 + rect: + serializedVersion: 2 + x: 96 + y: 64 + width: 16 + height: 16 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: 0 + bones: [] + spriteID: 006877ce92e6edb4483587bdad0e91d9 + internalID: 231691911 + vertices: [] + indices: + edges: [] + weights: [] outline: [] physicsShape: [] bones: [] @@ -536,10 +683,14 @@ TextureImporter: nameFileIdTable: Player_11: -375057873 Player_17: 118679525 + Player_20: -2109353353 Player_19: 2143467853 Player_2: -1841721584 Player_4: 825225972 Player_18: 1291750529 + Player_23: -724040594 + Player_22: 2059507875 + Player_25: -2100026830 Player_12: -284386636 Player_6: -1414671332 Player_1: -1592093818 @@ -551,8 +702,11 @@ TextureImporter: Player_3: -526475696 Player_8: 1791482633 Player_10: 1146259828 + Player_26: 231691911 Player_15: 180603488 Player_13: 1394398855 + Player_21: -932523871 + Player_24: -1692090074 Player_5: 1441602087 spritePackingTag: pSDRemoveMatte: 0