Player On Wall Animation Added

This commit is contained in:
Syntriax 2022-02-26 16:48:44 +03:00
parent ce746fc1aa
commit 2ba5ec8d32
6 changed files with 252 additions and 34 deletions

View File

@ -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: []

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: b40c9e52b72cda847a456f33b2c9cccf
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 7400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -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();

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@ -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