Idle and Running Animations Added
This commit is contained in:
parent
1dbac3508f
commit
6b2ffee7d2
|
@ -0,0 +1,8 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 64c1d66bac9caae43a47163eb71fe32f
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -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: Idle
|
||||||
|
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: []
|
|
@ -0,0 +1,8 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 3dcac57792de99b42af886a58c114b87
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 7400000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -0,0 +1,12 @@
|
||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!91 &9100000
|
||||||
|
AnimatorController:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Player_0
|
||||||
|
serializedVersion: 5
|
||||||
|
m_AnimatorParameters: []
|
||||||
|
m_AnimatorLayers: []
|
|
@ -0,0 +1,8 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: cef3d8d66721dc24b8dfe3db474b3f07
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 9100000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -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: Running
|
||||||
|
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: []
|
|
@ -0,0 +1,8 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: c22f1d967a219344794e3c79ae1b58db
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 7400000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -25,12 +25,12 @@ Transform:
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 698768804}
|
m_GameObject: {fileID: 698768804}
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
m_LocalPosition: {x: -0.5, y: 0, z: 0}
|
m_LocalPosition: {x: -0.75, y: -0.24, z: 0}
|
||||||
m_LocalScale: {x: 0.1, y: 1.3, z: 1}
|
m_LocalScale: {x: 0.1, y: 1.35, z: 1}
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 7008207192594766311}
|
m_Father: {fileID: 7008207192594766311}
|
||||||
m_RootOrder: 2
|
m_RootOrder: 1
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
--- !u!114 &698768806
|
--- !u!114 &698768806
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
|
@ -71,13 +71,13 @@ Transform:
|
||||||
m_PrefabInstance: {fileID: 0}
|
m_PrefabInstance: {fileID: 0}
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 2083070160}
|
m_GameObject: {fileID: 2083070160}
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||||
m_LocalPosition: {x: 0.5, y: 0, z: 0}
|
m_LocalPosition: {x: 0.75, y: -0.24, z: 0}
|
||||||
m_LocalScale: {x: 0.1, y: 1.3, z: 1}
|
m_LocalScale: {x: 0.1, y: 1.35, z: 1}
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 7008207192594766311}
|
m_Father: {fileID: 7008207192594766311}
|
||||||
m_RootOrder: 3
|
m_RootOrder: 2
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
--- !u!114 &2083070162
|
--- !u!114 &2083070162
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
|
@ -107,6 +107,7 @@ GameObject:
|
||||||
- component: {fileID: 7008207192594766310}
|
- component: {fileID: 7008207192594766310}
|
||||||
- component: {fileID: 7008207192594766309}
|
- component: {fileID: 7008207192594766309}
|
||||||
- component: {fileID: 7008207192594766308}
|
- component: {fileID: 7008207192594766308}
|
||||||
|
- component: {fileID: 4083120737150353938}
|
||||||
m_Layer: 6
|
m_Layer: 6
|
||||||
m_Name: Player
|
m_Name: Player
|
||||||
m_TagString: Player
|
m_TagString: Player
|
||||||
|
@ -122,12 +123,11 @@ Transform:
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 7008207192594766305}
|
m_GameObject: {fileID: 7008207192594766305}
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
m_LocalPosition: {x: -4.55, y: 0.41, z: 0}
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
m_LocalScale: {x: 1, y: 1.5, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children:
|
m_Children:
|
||||||
- {fileID: 7008207193600475140}
|
- {fileID: 7008207193600475140}
|
||||||
- {fileID: 3507368432553107122}
|
|
||||||
- {fileID: 698768805}
|
- {fileID: 698768805}
|
||||||
- {fileID: 2083070161}
|
- {fileID: 2083070161}
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
|
@ -174,7 +174,7 @@ SpriteRenderer:
|
||||||
m_SortingLayerID: 0
|
m_SortingLayerID: 0
|
||||||
m_SortingLayer: 0
|
m_SortingLayer: 0
|
||||||
m_SortingOrder: 0
|
m_SortingOrder: 0
|
||||||
m_Sprite: {fileID: 7482667652216324306, guid: 311925a002f4447b3a28927169b83ea6, type: 3}
|
m_Sprite: {fileID: 1298688296, guid: f33d6649831c9b9498b8109b6d344f43, type: 3}
|
||||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
m_FlipX: 0
|
m_FlipX: 0
|
||||||
m_FlipY: 0
|
m_FlipY: 0
|
||||||
|
@ -231,19 +231,39 @@ BoxCollider2D:
|
||||||
m_IsTrigger: 0
|
m_IsTrigger: 0
|
||||||
m_UsedByEffector: 0
|
m_UsedByEffector: 0
|
||||||
m_UsedByComposite: 0
|
m_UsedByComposite: 0
|
||||||
m_Offset: {x: 0, y: 0}
|
m_Offset: {x: 0, y: -0.25}
|
||||||
m_SpriteTilingProperty:
|
m_SpriteTilingProperty:
|
||||||
border: {x: 0, y: 0, z: 0, w: 0}
|
border: {x: 0, y: 0, z: 0, w: 0}
|
||||||
pivot: {x: 0.5, y: 0.5}
|
pivot: {x: 0.5, y: 0.5}
|
||||||
oldSize: {x: 1, y: 1}
|
oldSize: {x: 2, y: 2}
|
||||||
newSize: {x: 1, y: 1}
|
newSize: {x: 1, y: 1}
|
||||||
adaptiveTilingThreshold: 0.5
|
adaptiveTilingThreshold: 0.5
|
||||||
drawMode: 0
|
drawMode: 0
|
||||||
adaptiveTiling: 0
|
adaptiveTiling: 0
|
||||||
m_AutoTiling: 0
|
m_AutoTiling: 0
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_Size: {x: 1, y: 1}
|
m_Size: {x: 1.5, y: 1.5}
|
||||||
m_EdgeRadius: 0
|
m_EdgeRadius: 0
|
||||||
|
--- !u!95 &4083120737150353938
|
||||||
|
Animator:
|
||||||
|
serializedVersion: 4
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 7008207192594766305}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_Avatar: {fileID: 0}
|
||||||
|
m_Controller: {fileID: 9100000, guid: cef3d8d66721dc24b8dfe3db474b3f07, type: 2}
|
||||||
|
m_CullingMode: 0
|
||||||
|
m_UpdateMode: 0
|
||||||
|
m_ApplyRootMotion: 0
|
||||||
|
m_LinearVelocityBlending: 0
|
||||||
|
m_StabilizeFeet: 0
|
||||||
|
m_WarningMessage:
|
||||||
|
m_HasTransformHierarchy: 1
|
||||||
|
m_AllowConstantClipSamplingOptimization: 1
|
||||||
|
m_KeepAnimatorControllerStateOnDisable: 0
|
||||||
--- !u!1 &7008207193600475141
|
--- !u!1 &7008207193600475141
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -269,7 +289,7 @@ Transform:
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 7008207193600475141}
|
m_GameObject: {fileID: 7008207193600475141}
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
m_LocalPosition: {x: -0.005, y: -0.491, z: 0}
|
m_LocalPosition: {x: 0, y: -1.02, z: 0}
|
||||||
m_LocalScale: {x: 0.95, y: 0.05, z: 1}
|
m_LocalScale: {x: 0.95, y: 0.05, z: 1}
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children: []
|
m_Children: []
|
||||||
|
@ -291,50 +311,3 @@ MonoBehaviour:
|
||||||
layerMask:
|
layerMask:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_Bits: 4294967048
|
m_Bits: 4294967048
|
||||||
--- !u!1 &7353493454494059090
|
|
||||||
GameObject:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
serializedVersion: 6
|
|
||||||
m_Component:
|
|
||||||
- component: {fileID: 3507368432553107122}
|
|
||||||
- component: {fileID: 5720529389170152932}
|
|
||||||
m_Layer: 6
|
|
||||||
m_Name: PlayerInteractableTrigger
|
|
||||||
m_TagString: Untagged
|
|
||||||
m_Icon: {fileID: 0}
|
|
||||||
m_NavMeshLayer: 0
|
|
||||||
m_StaticEditorFlags: 0
|
|
||||||
m_IsActive: 1
|
|
||||||
--- !u!4 &3507368432553107122
|
|
||||||
Transform:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 7353493454494059090}
|
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
|
||||||
m_LocalPosition: {x: 0.72, y: 0, z: 0}
|
|
||||||
m_LocalScale: {x: 1, y: 1.5, z: 1}
|
|
||||||
m_ConstrainProportionsScale: 0
|
|
||||||
m_Children: []
|
|
||||||
m_Father: {fileID: 7008207192594766311}
|
|
||||||
m_RootOrder: 1
|
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
|
||||||
--- !u!114 &5720529389170152932
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 7353493454494059090}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: 7000c8c0eb91b2d4cb9a0e3ee1b609a7, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
layerMask:
|
|
||||||
serializedVersion: 2
|
|
||||||
m_Bits: 4294967040
|
|
||||||
|
|
|
@ -22,6 +22,7 @@ namespace Player
|
||||||
private const float FallMultiplier = 3.0f;
|
private const float FallMultiplier = 3.0f;
|
||||||
|
|
||||||
private const float LowJumpMultiplier = 40.0f;
|
private const float LowJumpMultiplier = 40.0f;
|
||||||
|
|
||||||
//End of credits
|
//End of credits
|
||||||
|
|
||||||
private PlayerInput _controls;
|
private PlayerInput _controls;
|
||||||
|
@ -29,7 +30,6 @@ namespace Player
|
||||||
private SpriteRenderer _playerSpriteRenderer;
|
private SpriteRenderer _playerSpriteRenderer;
|
||||||
|
|
||||||
private CollisionChecker _playerGroundTrigger;
|
private CollisionChecker _playerGroundTrigger;
|
||||||
private CollisionChecker _playerInteractableTrigger;
|
|
||||||
private CollisionChecker _playerWallTriggerLeft;
|
private CollisionChecker _playerWallTriggerLeft;
|
||||||
private CollisionChecker _playerWallTriggerRight;
|
private CollisionChecker _playerWallTriggerRight;
|
||||||
|
|
||||||
|
@ -45,12 +45,15 @@ namespace Player
|
||||||
private bool _canJump;
|
private bool _canJump;
|
||||||
private bool _afterMoving;
|
private bool _afterMoving;
|
||||||
|
|
||||||
|
private const string IsMovingParameter = "IsMoving";
|
||||||
|
private const string IsGroundedParameter = "IsGrounded";
|
||||||
|
private Animator animator = null;
|
||||||
|
|
||||||
private void Awake()
|
private void Awake()
|
||||||
{
|
{
|
||||||
_playerRigidbody2D = GetComponent<Rigidbody2D>();
|
_playerRigidbody2D = GetComponent<Rigidbody2D>();
|
||||||
_playerSpriteRenderer = GetComponent<SpriteRenderer>();
|
_playerSpriteRenderer = GetComponent<SpriteRenderer>();
|
||||||
_playerGroundTrigger = GameObject.Find("PlayerGroundTrigger").GetComponent<CollisionChecker>();
|
_playerGroundTrigger = GameObject.Find("PlayerGroundTrigger").GetComponent<CollisionChecker>();
|
||||||
_playerInteractableTrigger = GameObject.Find("PlayerInteractableTrigger").GetComponent<CollisionChecker>();
|
|
||||||
_playerWallTriggerLeft = GameObject.Find("PlayerWallTriggerLeft").GetComponent<CollisionChecker>();
|
_playerWallTriggerLeft = GameObject.Find("PlayerWallTriggerLeft").GetComponent<CollisionChecker>();
|
||||||
_playerWallTriggerRight = GameObject.Find("PlayerWallTriggerRight").GetComponent<CollisionChecker>();
|
_playerWallTriggerRight = GameObject.Find("PlayerWallTriggerRight").GetComponent<CollisionChecker>();
|
||||||
}
|
}
|
||||||
|
@ -67,6 +70,9 @@ namespace Player
|
||||||
};
|
};
|
||||||
|
|
||||||
_canJump = true;
|
_canJump = true;
|
||||||
|
|
||||||
|
animator = GetComponent<Animator>();
|
||||||
|
|
||||||
BaseSpeed = 0.0f;
|
BaseSpeed = 0.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -105,7 +111,11 @@ namespace Player
|
||||||
if (_moveKeyPressed)
|
if (_moveKeyPressed)
|
||||||
Move(_xAxisValue);
|
Move(_xAxisValue);
|
||||||
else
|
else
|
||||||
|
{
|
||||||
_playerRigidbody2D.velocity = new Vector2(0.0f, _playerRigidbody2D.velocity.y);
|
_playerRigidbody2D.velocity = new Vector2(0.0f, _playerRigidbody2D.velocity.y);
|
||||||
|
animator.SetBool(IsMovingParameter, false);
|
||||||
|
}
|
||||||
|
animator.SetBool(IsGroundedParameter, _playerGroundTrigger.IsCollided);
|
||||||
|
|
||||||
if (_jumpKeyPressed && _playerGroundTrigger.IsCollided && _canJump)
|
if (_jumpKeyPressed && _playerGroundTrigger.IsCollided && _canJump)
|
||||||
Jump();
|
Jump();
|
||||||
|
@ -158,13 +168,13 @@ namespace Player
|
||||||
_speed = MaxAirSpeed;
|
_speed = MaxAirSpeed;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
if (value < 0)
|
if (value < 0)
|
||||||
_speed = 0;
|
_speed = 0;
|
||||||
else
|
else
|
||||||
_speed = value;
|
_speed = value;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -192,6 +202,8 @@ namespace Player
|
||||||
BaseSpeed += AccelerationScale;
|
BaseSpeed += AccelerationScale;
|
||||||
_playerRigidbody2D.velocity = new Vector2(BaseSpeed * _xAxisValue * Time.fixedDeltaTime,
|
_playerRigidbody2D.velocity = new Vector2(BaseSpeed * _xAxisValue * Time.fixedDeltaTime,
|
||||||
_playerRigidbody2D.velocity.y);
|
_playerRigidbody2D.velocity.y);
|
||||||
|
animator.SetBool(IsMovingParameter, true);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DecelerationAfterMoving()
|
private void DecelerationAfterMoving()
|
||||||
|
@ -250,7 +262,6 @@ namespace Player
|
||||||
|
|
||||||
public void OnInteract(InputAction.CallbackContext context)
|
public void OnInteract(InputAction.CallbackContext context)
|
||||||
{
|
{
|
||||||
if (_playerInteractableTrigger.IsCollided)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
|
@ -0,0 +1,452 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: f33d6649831c9b9498b8109b6d344f43
|
||||||
|
TextureImporter:
|
||||||
|
internalIDToNameTable: []
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 11
|
||||||
|
mipmaps:
|
||||||
|
mipMapMode: 0
|
||||||
|
enableMipMap: 0
|
||||||
|
sRGBTexture: 1
|
||||||
|
linearTexture: 0
|
||||||
|
fadeOut: 0
|
||||||
|
borderMipMap: 0
|
||||||
|
mipMapsPreserveCoverage: 0
|
||||||
|
alphaTestReferenceValue: 0.5
|
||||||
|
mipMapFadeDistanceStart: 1
|
||||||
|
mipMapFadeDistanceEnd: 3
|
||||||
|
bumpmap:
|
||||||
|
convertToNormalMap: 0
|
||||||
|
externalNormalMap: 0
|
||||||
|
heightScale: 0.25
|
||||||
|
normalMapFilter: 0
|
||||||
|
isReadable: 0
|
||||||
|
streamingMipmaps: 0
|
||||||
|
streamingMipmapsPriority: 0
|
||||||
|
vTOnly: 0
|
||||||
|
ignoreMasterTextureLimit: 0
|
||||||
|
grayScaleToAlpha: 0
|
||||||
|
generateCubemap: 6
|
||||||
|
cubemapConvolution: 0
|
||||||
|
seamlessCubemap: 0
|
||||||
|
textureFormat: 1
|
||||||
|
maxTextureSize: 2048
|
||||||
|
textureSettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
filterMode: 0
|
||||||
|
aniso: 1
|
||||||
|
mipBias: 0
|
||||||
|
wrapU: 1
|
||||||
|
wrapV: 1
|
||||||
|
wrapW: 1
|
||||||
|
nPOTScale: 0
|
||||||
|
lightmap: 0
|
||||||
|
compressionQuality: 50
|
||||||
|
spriteMode: 2
|
||||||
|
spriteExtrude: 1
|
||||||
|
spriteMeshType: 1
|
||||||
|
alignment: 0
|
||||||
|
spritePivot: {x: 0.5, y: 0.5}
|
||||||
|
spritePixelsToUnits: 8
|
||||||
|
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
spriteGenerateFallbackPhysicsShape: 1
|
||||||
|
alphaUsage: 1
|
||||||
|
alphaIsTransparency: 1
|
||||||
|
spriteTessellationDetail: -1
|
||||||
|
textureType: 8
|
||||||
|
textureShape: 1
|
||||||
|
singleChannelComponent: 0
|
||||||
|
flipbookRows: 1
|
||||||
|
flipbookColumns: 1
|
||||||
|
maxTextureSizeSet: 0
|
||||||
|
compressionQualitySet: 0
|
||||||
|
textureFormatSet: 0
|
||||||
|
ignorePngGamma: 0
|
||||||
|
applyGammaDecoding: 0
|
||||||
|
platformSettings:
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: DefaultTexturePlatform
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: Standalone
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: Server
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
spriteSheet:
|
||||||
|
serializedVersion: 2
|
||||||
|
sprites:
|
||||||
|
- serializedVersion: 2
|
||||||
|
name: Player_0
|
||||||
|
rect:
|
||||||
|
serializedVersion: 2
|
||||||
|
x: 0
|
||||||
|
y: 16
|
||||||
|
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: b83589f9260f2904c8ed5bba9ef77fa5
|
||||||
|
internalID: 1298688296
|
||||||
|
vertices: []
|
||||||
|
indices:
|
||||||
|
edges: []
|
||||||
|
weights: []
|
||||||
|
- serializedVersion: 2
|
||||||
|
name: Player_1
|
||||||
|
rect:
|
||||||
|
serializedVersion: 2
|
||||||
|
x: 16
|
||||||
|
y: 16
|
||||||
|
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: 2988c4403df6daa43bf67efd8d642292
|
||||||
|
internalID: -1592093818
|
||||||
|
vertices: []
|
||||||
|
indices:
|
||||||
|
edges: []
|
||||||
|
weights: []
|
||||||
|
- serializedVersion: 2
|
||||||
|
name: Player_2
|
||||||
|
rect:
|
||||||
|
serializedVersion: 2
|
||||||
|
x: 32
|
||||||
|
y: 16
|
||||||
|
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: ba53475e2aa9b3944b2370dd9ebd41d0
|
||||||
|
internalID: -1841721584
|
||||||
|
vertices: []
|
||||||
|
indices:
|
||||||
|
edges: []
|
||||||
|
weights: []
|
||||||
|
- serializedVersion: 2
|
||||||
|
name: Player_3
|
||||||
|
rect:
|
||||||
|
serializedVersion: 2
|
||||||
|
x: 48
|
||||||
|
y: 16
|
||||||
|
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: 0d31b9d77b7b36b4ab5d0462d1832498
|
||||||
|
internalID: -526475696
|
||||||
|
vertices: []
|
||||||
|
indices:
|
||||||
|
edges: []
|
||||||
|
weights: []
|
||||||
|
- serializedVersion: 2
|
||||||
|
name: Player_4
|
||||||
|
rect:
|
||||||
|
serializedVersion: 2
|
||||||
|
x: 64
|
||||||
|
y: 16
|
||||||
|
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: 4bd9799fdd8a1e14184dea3d0a6c2057
|
||||||
|
internalID: 825225972
|
||||||
|
vertices: []
|
||||||
|
indices:
|
||||||
|
edges: []
|
||||||
|
weights: []
|
||||||
|
- serializedVersion: 2
|
||||||
|
name: Player_5
|
||||||
|
rect:
|
||||||
|
serializedVersion: 2
|
||||||
|
x: 80
|
||||||
|
y: 16
|
||||||
|
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: fdb2f5b77867f97488708071b75c759f
|
||||||
|
internalID: 1441602087
|
||||||
|
vertices: []
|
||||||
|
indices:
|
||||||
|
edges: []
|
||||||
|
weights: []
|
||||||
|
- serializedVersion: 2
|
||||||
|
name: Player_6
|
||||||
|
rect:
|
||||||
|
serializedVersion: 2
|
||||||
|
x: 0
|
||||||
|
y: 0
|
||||||
|
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: e0692d398332f1044ba3209d6833c1b4
|
||||||
|
internalID: -1414671332
|
||||||
|
vertices: []
|
||||||
|
indices:
|
||||||
|
edges: []
|
||||||
|
weights: []
|
||||||
|
- serializedVersion: 2
|
||||||
|
name: Player_7
|
||||||
|
rect:
|
||||||
|
serializedVersion: 2
|
||||||
|
x: 16
|
||||||
|
y: 0
|
||||||
|
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: 6a009aa1674f1494dba97fa5d0ef5d25
|
||||||
|
internalID: 1107039308
|
||||||
|
vertices: []
|
||||||
|
indices:
|
||||||
|
edges: []
|
||||||
|
weights: []
|
||||||
|
- serializedVersion: 2
|
||||||
|
name: Player_8
|
||||||
|
rect:
|
||||||
|
serializedVersion: 2
|
||||||
|
x: 32
|
||||||
|
y: 0
|
||||||
|
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: 3d6d8e81b0fe20c458100f2dc710e387
|
||||||
|
internalID: 1791482633
|
||||||
|
vertices: []
|
||||||
|
indices:
|
||||||
|
edges: []
|
||||||
|
weights: []
|
||||||
|
- serializedVersion: 2
|
||||||
|
name: Player_9
|
||||||
|
rect:
|
||||||
|
serializedVersion: 2
|
||||||
|
x: 48
|
||||||
|
y: 0
|
||||||
|
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: adf6ecb8b9ff74c419b9a61d52492ff0
|
||||||
|
internalID: 839540401
|
||||||
|
vertices: []
|
||||||
|
indices:
|
||||||
|
edges: []
|
||||||
|
weights: []
|
||||||
|
- serializedVersion: 2
|
||||||
|
name: Player_10
|
||||||
|
rect:
|
||||||
|
serializedVersion: 2
|
||||||
|
x: 64
|
||||||
|
y: 0
|
||||||
|
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: 52dc3327ceb25f34dbbb5c2307a81743
|
||||||
|
internalID: 1146259828
|
||||||
|
vertices: []
|
||||||
|
indices:
|
||||||
|
edges: []
|
||||||
|
weights: []
|
||||||
|
- serializedVersion: 2
|
||||||
|
name: Player_11
|
||||||
|
rect:
|
||||||
|
serializedVersion: 2
|
||||||
|
x: 80
|
||||||
|
y: 0
|
||||||
|
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: f243982bf3dfcfa49944c669e948fd8d
|
||||||
|
internalID: -375057873
|
||||||
|
vertices: []
|
||||||
|
indices:
|
||||||
|
edges: []
|
||||||
|
weights: []
|
||||||
|
- serializedVersion: 2
|
||||||
|
name: Player_12
|
||||||
|
rect:
|
||||||
|
serializedVersion: 2
|
||||||
|
x: 96
|
||||||
|
y: 0
|
||||||
|
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: ced1d0ee5c002a94da68c100c9ca4f56
|
||||||
|
internalID: -284386636
|
||||||
|
vertices: []
|
||||||
|
indices:
|
||||||
|
edges: []
|
||||||
|
weights: []
|
||||||
|
- serializedVersion: 2
|
||||||
|
name: Player_13
|
||||||
|
rect:
|
||||||
|
serializedVersion: 2
|
||||||
|
x: 112
|
||||||
|
y: 0
|
||||||
|
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: 24081251e8a2e9e46a704b77d788b544
|
||||||
|
internalID: 1394398855
|
||||||
|
vertices: []
|
||||||
|
indices:
|
||||||
|
edges: []
|
||||||
|
weights: []
|
||||||
|
- serializedVersion: 2
|
||||||
|
name: Player_14
|
||||||
|
rect:
|
||||||
|
serializedVersion: 2
|
||||||
|
x: 128
|
||||||
|
y: 0
|
||||||
|
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: b1abf7acd2be14f42b2d4d1ac91148c1
|
||||||
|
internalID: -2011013116
|
||||||
|
vertices: []
|
||||||
|
indices:
|
||||||
|
edges: []
|
||||||
|
weights: []
|
||||||
|
outline: []
|
||||||
|
physicsShape: []
|
||||||
|
bones: []
|
||||||
|
spriteID: 5e97eb03825dee720800000000000000
|
||||||
|
internalID: 0
|
||||||
|
vertices: []
|
||||||
|
indices:
|
||||||
|
edges: []
|
||||||
|
weights: []
|
||||||
|
secondaryTextures: []
|
||||||
|
nameFileIdTable:
|
||||||
|
Player_11: -375057873
|
||||||
|
Player_2: -1841721584
|
||||||
|
Player_4: 825225972
|
||||||
|
Player_12: -284386636
|
||||||
|
Player_6: -1414671332
|
||||||
|
Player_1: -1592093818
|
||||||
|
Player_9: 839540401
|
||||||
|
Player_14: -2011013116
|
||||||
|
Player_0: 1298688296
|
||||||
|
Player_7: 1107039308
|
||||||
|
Player_3: -526475696
|
||||||
|
Player_8: 1791482633
|
||||||
|
Player_10: 1146259828
|
||||||
|
Player_13: 1394398855
|
||||||
|
Player_5: 1441602087
|
||||||
|
spritePackingTag:
|
||||||
|
pSDRemoveMatte: 0
|
||||||
|
pSDShowRemoveMatteOption: 0
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
Loading…
Reference in New Issue