Added Orientation enum and climbing input handling

This commit is contained in:
OverflowNarhoym 2022-02-22 18:39:19 +01:00
parent da4fc01a50
commit 557496897a
5 changed files with 569 additions and 663 deletions

View File

@ -55,6 +55,15 @@ namespace Input
""processors"": """",
""interactions"": """",
""initialStateCheck"": false
},
{
""name"": ""Climb"",
""type"": ""Button"",
""id"": ""e2e43254-ce84-4db9-84e9-cad9af922a9f"",
""expectedControlType"": ""Button"",
""processors"": """",
""interactions"": """",
""initialStateCheck"": false
}
],
""bindings"": [
@ -149,7 +158,7 @@ namespace Input
{
""name"": """",
""id"": ""4eb9a209-b978-4daf-927a-2f013348d294"",
""path"": ""<Keyboard>/z"",
""path"": ""<Keyboard>/e"",
""interactions"": """",
""processors"": """",
""groups"": ""KeyBoard"",
@ -167,6 +176,39 @@ namespace Input
""action"": ""Interact"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""d690447f-c6c0-4ce5-aca1-c92e65d0ccc6"",
""path"": ""<Gamepad>/leftTrigger"",
""interactions"": """",
""processors"": """",
""groups"": ""Controller"",
""action"": ""Climb"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""010bad3a-3b2d-4a15-aec1-e927c7b749a1"",
""path"": ""<Gamepad>/rightTrigger"",
""interactions"": """",
""processors"": """",
""groups"": ""Controller"",
""action"": ""Climb"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""02b2ecde-c402-4840-9246-2bcd32b085de"",
""path"": ""<Keyboard>/x"",
""interactions"": """",
""processors"": """",
""groups"": ""KeyBoard"",
""action"": ""Climb"",
""isComposite"": false,
""isPartOfComposite"": false
}
]
}
@ -201,6 +243,7 @@ namespace Input
m_PlayerControl_Move = m_PlayerControl.FindAction("Move", throwIfNotFound: true);
m_PlayerControl_Jump = m_PlayerControl.FindAction("Jump", throwIfNotFound: true);
m_PlayerControl_Interact = m_PlayerControl.FindAction("Interact", throwIfNotFound: true);
m_PlayerControl_Climb = m_PlayerControl.FindAction("Climb", throwIfNotFound: true);
}
public void Dispose()
@ -263,6 +306,7 @@ namespace Input
private readonly InputAction m_PlayerControl_Move;
private readonly InputAction m_PlayerControl_Jump;
private readonly InputAction m_PlayerControl_Interact;
private readonly InputAction m_PlayerControl_Climb;
public struct PlayerControlActions
{
private @PlayerInput m_Wrapper;
@ -270,6 +314,7 @@ namespace Input
public InputAction @Move => m_Wrapper.m_PlayerControl_Move;
public InputAction @Jump => m_Wrapper.m_PlayerControl_Jump;
public InputAction @Interact => m_Wrapper.m_PlayerControl_Interact;
public InputAction @Climb => m_Wrapper.m_PlayerControl_Climb;
public InputActionMap Get() { return m_Wrapper.m_PlayerControl; }
public void Enable() { Get().Enable(); }
public void Disable() { Get().Disable(); }
@ -288,6 +333,9 @@ namespace Input
@Interact.started -= m_Wrapper.m_PlayerControlActionsCallbackInterface.OnInteract;
@Interact.performed -= m_Wrapper.m_PlayerControlActionsCallbackInterface.OnInteract;
@Interact.canceled -= m_Wrapper.m_PlayerControlActionsCallbackInterface.OnInteract;
@Climb.started -= m_Wrapper.m_PlayerControlActionsCallbackInterface.OnClimb;
@Climb.performed -= m_Wrapper.m_PlayerControlActionsCallbackInterface.OnClimb;
@Climb.canceled -= m_Wrapper.m_PlayerControlActionsCallbackInterface.OnClimb;
}
m_Wrapper.m_PlayerControlActionsCallbackInterface = instance;
if (instance != null)
@ -301,6 +349,9 @@ namespace Input
@Interact.started += instance.OnInteract;
@Interact.performed += instance.OnInteract;
@Interact.canceled += instance.OnInteract;
@Climb.started += instance.OnClimb;
@Climb.performed += instance.OnClimb;
@Climb.canceled += instance.OnClimb;
}
}
}
@ -328,6 +379,7 @@ namespace Input
void OnMove(InputAction.CallbackContext context);
void OnJump(InputAction.CallbackContext context);
void OnInteract(InputAction.CallbackContext context);
void OnClimb(InputAction.CallbackContext context);
}
}
}

View File

@ -31,6 +31,15 @@
"processors": "",
"interactions": "",
"initialStateCheck": false
},
{
"name": "Climb",
"type": "Button",
"id": "e2e43254-ce84-4db9-84e9-cad9af922a9f",
"expectedControlType": "Button",
"processors": "",
"interactions": "",
"initialStateCheck": false
}
],
"bindings": [
@ -125,7 +134,7 @@
{
"name": "",
"id": "4eb9a209-b978-4daf-927a-2f013348d294",
"path": "<Keyboard>/z",
"path": "<Keyboard>/e",
"interactions": "",
"processors": "",
"groups": "KeyBoard",
@ -143,6 +152,39 @@
"action": "Interact",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "d690447f-c6c0-4ce5-aca1-c92e65d0ccc6",
"path": "<Gamepad>/leftTrigger",
"interactions": "",
"processors": "",
"groups": "Controller",
"action": "Climb",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "010bad3a-3b2d-4a15-aec1-e927c7b749a1",
"path": "<Gamepad>/rightTrigger",
"interactions": "",
"processors": "",
"groups": "Controller",
"action": "Climb",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "02b2ecde-c402-4840-9246-2bcd32b085de",
"path": "<Keyboard>/x",
"interactions": "",
"processors": "",
"groups": "KeyBoard",
"action": "Climb",
"isComposite": false,
"isPartOfComposite": false
}
]
}

View File

@ -123,7 +123,7 @@ NavMeshSettings:
debug:
m_Flags: 0
m_NavMeshData: {fileID: 0}
--- !u!1 &65152409
--- !u!1 &434782288
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
@ -131,558 +131,234 @@ GameObject:
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 65152410}
- component: {fileID: 65152411}
m_Layer: 0
m_Name: CM vcam1
- component: {fileID: 434782289}
- component: {fileID: 434782294}
- component: {fileID: 434782293}
- component: {fileID: 434782292}
- component: {fileID: 434782291}
- component: {fileID: 434782290}
m_Layer: 3
m_Name: TilemapTest
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &65152410
--- !u!4 &434782289
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 65152409}
m_GameObject: {fileID: 434782288}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -24.753765, y: 2.9204586, z: -9.967962}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 1483260705}
m_Father: {fileID: 1448490237}
m_RootOrder: 1
m_Children: []
m_Father: {fileID: 1560056817}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &65152411
--- !u!66 &434782290
CompositeCollider2D:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 434782288}
m_Enabled: 1
m_Density: 1
m_Material: {fileID: 0}
m_IsTrigger: 0
m_UsedByEffector: 0
m_UsedByComposite: 0
m_Offset: {x: 0, y: 0}
m_GeometryType: 0
m_GenerationType: 0
m_EdgeRadius: 0
m_ColliderPaths:
- m_Collider: {fileID: 434782291}
m_ColliderPaths: []
m_CompositePaths:
m_Paths: []
m_VertexDistance: 0.0005
m_OffsetDistance: 0.00005
--- !u!19719996 &434782291
TilemapCollider2D:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 434782288}
m_Enabled: 1
m_Density: 1
m_Material: {fileID: 0}
m_IsTrigger: 0
m_UsedByEffector: 0
m_UsedByComposite: 1
m_Offset: {x: 0, y: 0}
m_MaximumTileChangeCount: 1000
m_ExtrusionFactor: 0.00001
--- !u!50 &434782292
Rigidbody2D:
serializedVersion: 4
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 434782288}
m_BodyType: 2
m_Simulated: 1
m_UseFullKinematicContacts: 0
m_UseAutoMass: 0
m_Mass: 1
m_LinearDrag: 0
m_AngularDrag: 0.05
m_GravityScale: 1
m_Material: {fileID: 0}
m_Interpolate: 0
m_SleepingMode: 1
m_CollisionDetection: 0
m_Constraints: 0
--- !u!483693784 &434782293
TilemapRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 434782288}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 0
m_ReflectionProbeUsage: 0
m_RayTracingMode: 0
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_ChunkSize: {x: 32, y: 32, z: 32}
m_ChunkCullingBounds: {x: 0, y: 0, z: 0}
m_MaxChunkCount: 16
m_MaxFrameAge: 16
m_SortOrder: 0
m_Mode: 0
m_DetectChunkCullingBounds: 0
m_MaskInteraction: 0
--- !u!1839735485 &434782294
Tilemap:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 434782288}
m_Enabled: 1
m_Tiles: {}
m_AnimatedTiles: {}
m_TileAssetArray: []
m_TileSpriteArray: []
m_TileMatrixArray: []
m_TileColorArray: []
m_TileObjectToInstantiateArray: []
m_AnimationFrameRate: 1
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_Origin: {x: 0, y: 0, z: 0}
m_Size: {x: 0, y: 0, z: 1}
m_TileAnchor: {x: 0.5, y: 0.5, z: 0}
m_TileOrientation: 0
m_TileOrientationMatrix:
e00: 1
e01: 0
e02: 0
e03: 0
e10: 0
e11: 1
e12: 0
e13: 0
e20: 0
e21: 0
e22: 1
e23: 0
e30: 0
e31: 0
e32: 0
e33: 1
--- !u!1 &698768804
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 698768805}
- component: {fileID: 698768806}
m_Layer: 6
m_Name: PlayerWallTriggerLeft
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &698768805
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 698768804}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -0.5, y: 0, z: 0}
m_LocalScale: {x: 0.1, y: 2, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1053905692}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &698768806
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 65152409}
m_GameObject: {fileID: 698768804}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 45e653bab7fb20e499bda25e1b646fea, type: 3}
m_Script: {fileID: 11500000, guid: 7000c8c0eb91b2d4cb9a0e3ee1b609a7, type: 3}
m_Name:
m_EditorClassIdentifier:
m_ExcludedPropertiesInInspector:
- m_Script
m_LockStageInInspector:
m_StreamingVersion: 20170927
m_Priority: 10
m_StandbyUpdate: 2
m_LookAt: {fileID: 0}
m_Follow: {fileID: 1053905692}
m_Lens:
FieldOfView: 60
OrthographicSize: 13
NearClipPlane: 0.3
FarClipPlane: 1000
Dutch: 0
ModeOverride: 0
LensShift: {x: 0, y: 0}
GateFit: 2
m_SensorSize: {x: 1.7777778, y: 1}
m_Transitions:
m_BlendHint: 0
m_InheritPosition: 0
m_OnCameraLive:
m_PersistentCalls:
m_Calls: []
m_LegacyBlendHint: 0
m_ComponentOwner: {fileID: 1483260705}
--- !u!1001 &151052495
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 847968262667012088, guid: 9bff55120282d9e45a29d69eea4e6543, type: 3}
propertyPath: m_RootOrder
value: 7
objectReference: {fileID: 0}
- target: {fileID: 847968262667012088, guid: 9bff55120282d9e45a29d69eea4e6543, type: 3}
propertyPath: m_LocalScale.x
value: 15
objectReference: {fileID: 0}
- target: {fileID: 847968262667012088, guid: 9bff55120282d9e45a29d69eea4e6543, type: 3}
propertyPath: m_LocalPosition.x
value: 16.55
objectReference: {fileID: 0}
- target: {fileID: 847968262667012088, guid: 9bff55120282d9e45a29d69eea4e6543, type: 3}
propertyPath: m_LocalPosition.y
value: -1
objectReference: {fileID: 0}
- target: {fileID: 847968262667012088, guid: 9bff55120282d9e45a29d69eea4e6543, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 847968262667012088, guid: 9bff55120282d9e45a29d69eea4e6543, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 847968262667012088, guid: 9bff55120282d9e45a29d69eea4e6543, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 847968262667012088, guid: 9bff55120282d9e45a29d69eea4e6543, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 847968262667012088, guid: 9bff55120282d9e45a29d69eea4e6543, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 847968262667012088, guid: 9bff55120282d9e45a29d69eea4e6543, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 847968262667012088, guid: 9bff55120282d9e45a29d69eea4e6543, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 847968262667012088, guid: 9bff55120282d9e45a29d69eea4e6543, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 847968262667012094, guid: 9bff55120282d9e45a29d69eea4e6543, type: 3}
propertyPath: m_Name
value: PlatformTest (4)
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 9bff55120282d9e45a29d69eea4e6543, type: 3}
--- !u!1001 &498167244
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 847968262667012088, guid: 9bff55120282d9e45a29d69eea4e6543, type: 3}
propertyPath: m_RootOrder
value: 3
objectReference: {fileID: 0}
- target: {fileID: 847968262667012088, guid: 9bff55120282d9e45a29d69eea4e6543, type: 3}
propertyPath: m_LocalScale.x
value: 5
objectReference: {fileID: 0}
- target: {fileID: 847968262667012088, guid: 9bff55120282d9e45a29d69eea4e6543, type: 3}
propertyPath: m_LocalPosition.x
value: -4.47
objectReference: {fileID: 0}
- target: {fileID: 847968262667012088, guid: 9bff55120282d9e45a29d69eea4e6543, type: 3}
propertyPath: m_LocalPosition.y
value: 1.46
objectReference: {fileID: 0}
- target: {fileID: 847968262667012088, guid: 9bff55120282d9e45a29d69eea4e6543, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 847968262667012088, guid: 9bff55120282d9e45a29d69eea4e6543, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 847968262667012088, guid: 9bff55120282d9e45a29d69eea4e6543, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 847968262667012088, guid: 9bff55120282d9e45a29d69eea4e6543, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 847968262667012088, guid: 9bff55120282d9e45a29d69eea4e6543, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 847968262667012088, guid: 9bff55120282d9e45a29d69eea4e6543, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 847968262667012088, guid: 9bff55120282d9e45a29d69eea4e6543, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 847968262667012088, guid: 9bff55120282d9e45a29d69eea4e6543, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 847968262667012094, guid: 9bff55120282d9e45a29d69eea4e6543, type: 3}
propertyPath: m_Name
value: PlatformTest (1)
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 9bff55120282d9e45a29d69eea4e6543, type: 3}
--- !u!1001 &1032596411
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 847968262667012088, guid: 9bff55120282d9e45a29d69eea4e6543, type: 3}
propertyPath: m_RootOrder
value: 5
objectReference: {fileID: 0}
- target: {fileID: 847968262667012088, guid: 9bff55120282d9e45a29d69eea4e6543, type: 3}
propertyPath: m_LocalScale.x
value: 5
objectReference: {fileID: 0}
- target: {fileID: 847968262667012088, guid: 9bff55120282d9e45a29d69eea4e6543, type: 3}
propertyPath: m_LocalPosition.x
value: -12.01
objectReference: {fileID: 0}
- target: {fileID: 847968262667012088, guid: 9bff55120282d9e45a29d69eea4e6543, type: 3}
propertyPath: m_LocalPosition.y
value: -1
objectReference: {fileID: 0}
- target: {fileID: 847968262667012088, guid: 9bff55120282d9e45a29d69eea4e6543, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 847968262667012088, guid: 9bff55120282d9e45a29d69eea4e6543, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 847968262667012088, guid: 9bff55120282d9e45a29d69eea4e6543, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 847968262667012088, guid: 9bff55120282d9e45a29d69eea4e6543, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 847968262667012088, guid: 9bff55120282d9e45a29d69eea4e6543, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 847968262667012088, guid: 9bff55120282d9e45a29d69eea4e6543, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 847968262667012088, guid: 9bff55120282d9e45a29d69eea4e6543, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 847968262667012088, guid: 9bff55120282d9e45a29d69eea4e6543, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 847968262667012094, guid: 9bff55120282d9e45a29d69eea4e6543, type: 3}
propertyPath: m_Name
value: PlatformTest (2)
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 9bff55120282d9e45a29d69eea4e6543, type: 3}
layerMask:
serializedVersion: 2
m_Bits: 4294967103
--- !u!4 &1053905692 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 7008207192594766311, guid: 2ed6bfce9ad3e19428cb9bef743e0fa3, type: 3}
m_PrefabInstance: {fileID: 7008207193554258683}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &1174240662
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 847968262667012088, guid: 9bff55120282d9e45a29d69eea4e6543, type: 3}
propertyPath: m_RootOrder
value: 6
objectReference: {fileID: 0}
- target: {fileID: 847968262667012088, guid: 9bff55120282d9e45a29d69eea4e6543, type: 3}
propertyPath: m_LocalScale.x
value: 15
objectReference: {fileID: 0}
- target: {fileID: 847968262667012088, guid: 9bff55120282d9e45a29d69eea4e6543, type: 3}
propertyPath: m_LocalPosition.x
value: -24.78
objectReference: {fileID: 0}
- target: {fileID: 847968262667012088, guid: 9bff55120282d9e45a29d69eea4e6543, type: 3}
propertyPath: m_LocalPosition.y
value: -1
objectReference: {fileID: 0}
- target: {fileID: 847968262667012088, guid: 9bff55120282d9e45a29d69eea4e6543, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 847968262667012088, guid: 9bff55120282d9e45a29d69eea4e6543, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 847968262667012088, guid: 9bff55120282d9e45a29d69eea4e6543, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 847968262667012088, guid: 9bff55120282d9e45a29d69eea4e6543, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 847968262667012088, guid: 9bff55120282d9e45a29d69eea4e6543, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 847968262667012088, guid: 9bff55120282d9e45a29d69eea4e6543, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 847968262667012088, guid: 9bff55120282d9e45a29d69eea4e6543, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 847968262667012088, guid: 9bff55120282d9e45a29d69eea4e6543, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 847968262667012094, guid: 9bff55120282d9e45a29d69eea4e6543, type: 3}
propertyPath: m_Name
value: PlatformTest (3)
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 9bff55120282d9e45a29d69eea4e6543, type: 3}
--- !u!1 &1448490236
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1448490237}
m_Layer: 0
m_Name: Camera
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1448490237
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1448490236}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -6.536235, y: -1.9904585, z: -0.03203782}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 1514474963}
- {fileID: 65152410}
m_Father: {fileID: 0}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1483260704
GameObject:
m_ObjectHideFlags: 3
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1483260705}
- component: {fileID: 1483260707}
- component: {fileID: 1483260706}
m_Layer: 0
m_Name: cm
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1483260705
Transform:
m_ObjectHideFlags: 3
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1483260704}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 6.536235, y: 1.9904585, z: 7.6195736}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 65152410}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1483260706
MonoBehaviour:
m_ObjectHideFlags: 3
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1483260704}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 6ad980451443d70438faac0bc6c235a0, type: 3}
m_Name:
m_EditorClassIdentifier:
m_TrackedObjectOffset: {x: 0, y: 0, z: 0}
m_LookaheadTime: 0
m_LookaheadSmoothing: 0
m_LookaheadIgnoreY: 1
m_XDamping: 1
m_YDamping: 1
m_ZDamping: 0
m_TargetMovementOnly: 1
m_ScreenX: 0.5
m_ScreenY: 0.5
m_CameraDistance: 10
m_DeadZoneWidth: 0
m_DeadZoneHeight: 0
m_DeadZoneDepth: 0
m_UnlimitedSoftZone: 0
m_SoftZoneWidth: 0.8
m_SoftZoneHeight: 0.8
m_BiasX: 0
m_BiasY: 0
m_CenterOnActivate: 1
m_GroupFramingMode: 2
m_AdjustmentMode: 0
m_GroupFramingSize: 0.8
m_MaxDollyIn: 5000
m_MaxDollyOut: 5000
m_MinimumDistance: 1
m_MaximumDistance: 5000
m_MinimumFOV: 3
m_MaximumFOV: 60
m_MinimumOrthoSize: 1
m_MaximumOrthoSize: 5000
--- !u!114 &1483260707
MonoBehaviour:
m_ObjectHideFlags: 3
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1483260704}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ac0b09e7857660247b1477e93731de29, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &1514474960
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1514474963}
- component: {fileID: 1514474962}
- component: {fileID: 1514474961}
- component: {fileID: 1514474964}
m_Layer: 0
m_Name: Main Camera
m_TagString: MainCamera
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!81 &1514474961
AudioListener:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1514474960}
m_Enabled: 1
--- !u!20 &1514474962
Camera:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1514474960}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 1
m_BackGroundColor: {r: 0.8867924, g: 0.14556777, b: 0.5208201, a: 0}
m_projectionMatrixMode: 1
m_GateFitMode: 2
m_FOVAxisMode: 0
m_SensorSize: {x: 36, y: 24}
m_LensShift: {x: 0, y: 0}
m_FocalLength: 50
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
near clip plane: 0.3
far clip plane: 1000
field of view: 60
orthographic: 1
orthographic size: 13
m_Depth: -1
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
m_TargetEye: 3
m_HDR: 1
m_AllowMSAA: 1
m_AllowDynamicResolution: 0
m_ForceIntoRT: 0
m_OcclusionCulling: 1
m_StereoConvergence: 10
m_StereoSeparation: 0.022
--- !u!4 &1514474963
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1514474960}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -24.753765, y: 2.9204586, z: -9.967962}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1448490237}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1514474964
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1514474960}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 72ece51f2901e7445ab60da3685d6b5f, type: 3}
m_Name:
m_EditorClassIdentifier:
m_ShowDebugText: 0
m_ShowCameraFrustum: 1
m_IgnoreTimeScale: 0
m_WorldUpOverride: {fileID: 0}
m_UpdateMethod: 2
m_BlendUpdateMethod: 1
m_DefaultBlend:
m_Style: 1
m_Time: 2
m_CustomCurve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
m_CustomBlends: {fileID: 0}
m_CameraCutEvent:
m_PersistentCalls:
m_Calls: []
m_CameraActivatedEvent:
m_PersistentCalls:
m_Calls: []
--- !u!1 &1524344315
GameObject:
m_ObjectHideFlags: 0
@ -777,67 +453,175 @@ Transform:
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
--- !u!1001 &847968261128498245
--- !u!1 &1560056815
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1560056817}
- component: {fileID: 1560056816}
m_Layer: 0
m_Name: Grid
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!156049354 &1560056816
Grid:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1560056815}
m_Enabled: 1
m_CellSize: {x: 1, y: 1, z: 0}
m_CellGap: {x: 0, y: 0, z: 0}
m_CellLayout: 0
m_CellSwizzle: 0
--- !u!4 &1560056817
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1560056815}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 434782289}
m_Father: {fileID: 0}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &2083070160
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2083070161}
- component: {fileID: 2083070162}
m_Layer: 6
m_Name: PlayerWallTriggerRight
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &2083070161
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2083070160}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0.5, y: 0, z: 0}
m_LocalScale: {x: 0.1, y: 2, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1053905692}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &2083070162
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2083070160}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 7000c8c0eb91b2d4cb9a0e3ee1b609a7, type: 3}
m_Name:
m_EditorClassIdentifier:
layerMask:
serializedVersion: 2
m_Bits: 4294967103
--- !u!1001 &2662163040783957219
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 847968262667012088, guid: 9bff55120282d9e45a29d69eea4e6543, type: 3}
propertyPath: m_RootOrder
value: 4
- target: {fileID: 2662163039882375478, guid: 1da5e227ed55bcd4b943e0ceef78aefb, type: 3}
propertyPath: m_AssetsPPU
value: 8
objectReference: {fileID: 0}
- target: {fileID: 847968262667012088, guid: 9bff55120282d9e45a29d69eea4e6543, type: 3}
propertyPath: m_LocalScale.x
value: 5
objectReference: {fileID: 0}
- target: {fileID: 847968262667012088, guid: 9bff55120282d9e45a29d69eea4e6543, type: 3}
propertyPath: m_LocalPosition.x
value: 3.54
objectReference: {fileID: 0}
- target: {fileID: 847968262667012088, guid: 9bff55120282d9e45a29d69eea4e6543, type: 3}
propertyPath: m_LocalPosition.y
value: -1
objectReference: {fileID: 0}
- target: {fileID: 847968262667012088, guid: 9bff55120282d9e45a29d69eea4e6543, type: 3}
propertyPath: m_LocalPosition.z
- target: {fileID: 2662163039882375478, guid: 1da5e227ed55bcd4b943e0ceef78aefb, type: 3}
propertyPath: m_UpscaleRT
value: 0
objectReference: {fileID: 0}
- target: {fileID: 847968262667012088, guid: 9bff55120282d9e45a29d69eea4e6543, type: 3}
- target: {fileID: 2662163039882375478, guid: 1da5e227ed55bcd4b943e0ceef78aefb, type: 3}
propertyPath: m_RefResolutionX
value: 426
objectReference: {fileID: 0}
- target: {fileID: 2662163039882375478, guid: 1da5e227ed55bcd4b943e0ceef78aefb, type: 3}
propertyPath: m_RefResolutionY
value: 240
objectReference: {fileID: 0}
- target: {fileID: 2662163039948621854, guid: 1da5e227ed55bcd4b943e0ceef78aefb, type: 3}
propertyPath: m_RootOrder
value: 2
objectReference: {fileID: 0}
- target: {fileID: 2662163039948621854, guid: 1da5e227ed55bcd4b943e0ceef78aefb, type: 3}
propertyPath: m_LocalPosition.x
value: -6.536235
objectReference: {fileID: 0}
- target: {fileID: 2662163039948621854, guid: 1da5e227ed55bcd4b943e0ceef78aefb, type: 3}
propertyPath: m_LocalPosition.y
value: -1.9904585
objectReference: {fileID: 0}
- target: {fileID: 2662163039948621854, guid: 1da5e227ed55bcd4b943e0ceef78aefb, type: 3}
propertyPath: m_LocalPosition.z
value: -0.03203782
objectReference: {fileID: 0}
- target: {fileID: 2662163039948621854, guid: 1da5e227ed55bcd4b943e0ceef78aefb, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 847968262667012088, guid: 9bff55120282d9e45a29d69eea4e6543, type: 3}
- target: {fileID: 2662163039948621854, guid: 1da5e227ed55bcd4b943e0ceef78aefb, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 847968262667012088, guid: 9bff55120282d9e45a29d69eea4e6543, type: 3}
- target: {fileID: 2662163039948621854, guid: 1da5e227ed55bcd4b943e0ceef78aefb, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 847968262667012088, guid: 9bff55120282d9e45a29d69eea4e6543, type: 3}
- target: {fileID: 2662163039948621854, guid: 1da5e227ed55bcd4b943e0ceef78aefb, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 847968262667012088, guid: 9bff55120282d9e45a29d69eea4e6543, type: 3}
- target: {fileID: 2662163039948621854, guid: 1da5e227ed55bcd4b943e0ceef78aefb, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 847968262667012088, guid: 9bff55120282d9e45a29d69eea4e6543, type: 3}
- target: {fileID: 2662163039948621854, guid: 1da5e227ed55bcd4b943e0ceef78aefb, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 847968262667012088, guid: 9bff55120282d9e45a29d69eea4e6543, type: 3}
- target: {fileID: 2662163039948621854, guid: 1da5e227ed55bcd4b943e0ceef78aefb, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 847968262667012094, guid: 9bff55120282d9e45a29d69eea4e6543, type: 3}
- target: {fileID: 2662163039948621855, guid: 1da5e227ed55bcd4b943e0ceef78aefb, type: 3}
propertyPath: m_Name
value: PlatformTest
value: Camera
objectReference: {fileID: 0}
- target: {fileID: 2662163040849090936, guid: 1da5e227ed55bcd4b943e0ceef78aefb, type: 3}
propertyPath: m_Follow
value:
objectReference: {fileID: 1053905692}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 9bff55120282d9e45a29d69eea4e6543, type: 3}
m_SourcePrefab: {fileID: 100100000, guid: 1da5e227ed55bcd4b943e0ceef78aefb, type: 3}
--- !u!1001 &7008207193554258683
PrefabInstance:
m_ObjectHideFlags: 0

View File

@ -16,7 +16,7 @@ namespace Player
private const float GravityScale = 5.0f;
private const float FallMultiplier = 4.0f;
private const float LowJumpMultiplier = 10.0f;
private const float LowJumpMultiplier = 4.0f;
private PlayerInput _controls;
private Rigidbody2D _playerRigidbody2D;
@ -25,6 +25,8 @@ namespace Player
private CollisionChecker _playerGroundTrigger;
private CollisionChecker _playerInteractableTrigger;
private Orientation _orientation;
private bool _moveKeyPressed;
private bool _jumpKeyPressed;
@ -33,6 +35,7 @@ namespace Player
private bool _isOnAir;
private bool _canJump;
private bool _afterMoving;
private void Awake()
{
@ -46,6 +49,13 @@ namespace Player
{
_playerRigidbody2D.mass = DefaultMass;
_playerRigidbody2D.gravityScale = GravityScale;
_orientation = gameObject.GetComponent<SpriteRenderer>().flipX switch
{
true => Orientation.Left,
false => Orientation.Right
};
_canJump = true;
BaseSpeed = 0.0f;
}
@ -68,21 +78,17 @@ namespace Player
private void FixedUpdate()
{
/*switch (_playerRigidbody2D.velocity.y)
switch (_playerRigidbody2D.velocity.y)
{
case < 0:
_playerRigidbody2D.velocity +=
Vector2.up * (Physics2D.gravity.y * (FallMultiplier - 1) * Time.fixedDeltaTime);
break;
/*case > 0 and < 3:
print("We will go down" + i);
++i;
break;
case > 0 when !_jumpKeyPressed:
_playerRigidbody2D.velocity +=
Vector2.up * (Physics2D.gravity.y * (LowJumpMultiplier - 1) * Time.fixedDeltaTime);
break;
}*/
}
if (_moveKeyPressed)
Move(_xAxisValue);
@ -91,6 +97,9 @@ namespace Player
if (_jumpKeyPressed && _canJump && _playerGroundTrigger.IsCollided)
Jump();
if (_afterMoving)
DecelerationAfterMoving();
}
private void Update()
@ -140,9 +149,11 @@ namespace Player
{
case < 0:
_playerSpriteRenderer.flipX = true;
_orientation = Orientation.Left;
break;
case > 0:
_playerSpriteRenderer.flipX = false;
_orientation = Orientation.Right;
break;
default:
_playerSpriteRenderer.flipX = _playerSpriteRenderer.flipX;
@ -157,7 +168,11 @@ namespace Player
private void DecelerationAfterMoving()
{
throw new NotImplementedException();
BaseSpeed -= 80;
_playerRigidbody2D.velocity = new Vector2(BaseSpeed * (int)_orientation * Time.fixedDeltaTime,
_playerRigidbody2D.velocity.y);
if (BaseSpeed == 0)
_afterMoving = false;
}
private void Jump()
@ -180,9 +195,10 @@ namespace Player
{
case true:
_moveKeyPressed = false;
BaseSpeed = 0;
_afterMoving = true;
break;
case false:
_afterMoving = false;
_moveKeyPressed = true;
_xAxisValue = context.ReadValue<float>();
break;
@ -208,5 +224,16 @@ namespace Player
if (_playerInteractableTrigger.IsCollided)
throw new NotImplementedException();
}
public void OnClimb(InputAction.CallbackContext context)
{
Climb();
}
private enum Orientation
{
Left = -1,
Right = 1
}
}
}

View File

@ -14,7 +14,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
m_Children:
- {fileID: 3}
- {fileID: 8}
- {fileID: 9}
- {fileID: 13}
m_Position:
serializedVersion: 2
@ -25,7 +25,7 @@ MonoBehaviour:
m_MinSize: {x: 300, y: 200}
m_MaxSize: {x: 24288, y: 16192}
vertical: 0
controlID: 28005
controlID: 589
--- !u!114 &2
MonoBehaviour:
m_ObjectHideFlags: 52
@ -46,10 +46,10 @@ MonoBehaviour:
m_Tooltip:
m_Pos:
serializedVersion: 2
x: 302.4
y: 73.6
width: 879.6
height: 493.40002
x: 304
y: 472.80002
width: 878
height: 310.59998
m_ViewDataDictionary: {fileID: 0}
m_OverlayCanvas:
m_LastAppliedPresetName: Default
@ -96,23 +96,23 @@ MonoBehaviour:
serializedVersion: 2
x: 0
y: 21
width: 879.6
height: 472.40002
m_Scale: {x: 0.5467593, y: 0.5467593}
m_Translation: {x: 439.8, y: 236.19998}
width: 878
height: 289.59998
m_Scale: {x: 0.3351852, y: 0.33518517}
m_Translation: {x: 439.00003, y: 144.79997}
m_MarginLeft: 0
m_MarginRight: 0
m_MarginTop: 0
m_MarginBottom: 0
m_LastShownAreaInsideMargins:
serializedVersion: 2
x: -804.37585
x: -1309.7238
y: -431.99994
width: 1608.7517
width: 2619.4475
height: 863.99994
m_MinimalGUI: 1
m_defaultScale: 0.5467593
m_LastWindowPixelSize: {x: 1099.5, y: 616.75}
m_defaultScale: 0.33518517
m_LastWindowPixelSize: {x: 1097.5, y: 388.24997}
m_ClearInEditMode: 1
m_NoCameraWarning: 1
m_LowResolutionForAspectRatios: 00000000000100000100
@ -137,12 +137,12 @@ MonoBehaviour:
serializedVersion: 2
x: 0
y: 0
width: 302.4
width: 304
height: 730.8
m_MinSize: {x: 100, y: 200}
m_MaxSize: {x: 8096, y: 16192}
vertical: 1
controlID: 27987
controlID: 548
--- !u!114 &4
MonoBehaviour:
m_ObjectHideFlags: 52
@ -160,10 +160,10 @@ MonoBehaviour:
serializedVersion: 2
x: 0
y: 0
width: 302.4
width: 304
height: 381.6
m_MinSize: {x: 200, y: 200}
m_MaxSize: {x: 4000, y: 4000}
m_MinSize: {x: 201, y: 221}
m_MaxSize: {x: 4001, y: 4021}
m_ActualView: {fileID: 5}
m_Panes:
- {fileID: 5}
@ -191,7 +191,7 @@ MonoBehaviour:
serializedVersion: 2
x: 0
y: 73.6
width: 301.4
width: 303
height: 360.6
m_ViewDataDictionary: {fileID: 0}
m_OverlayCanvas:
@ -202,7 +202,7 @@ MonoBehaviour:
scrollPos: {x: 0, y: 0}
m_SelectedIDs:
m_LastClickedID: 0
m_ExpandedIDs: 0efbffff
m_ExpandedIDs: 04fbfffff0620000
m_RenameOverlay:
m_UserAcceptedRename: 0
m_Name:
@ -243,15 +243,16 @@ MonoBehaviour:
serializedVersion: 2
x: 0
y: 381.6
width: 302.4
width: 304
height: 349.19998
m_MinSize: {x: 230, y: 250}
m_MaxSize: {x: 10000, y: 10000}
m_MinSize: {x: 231, y: 271}
m_MaxSize: {x: 10001, y: 10021}
m_ActualView: {fileID: 7}
m_Panes:
- {fileID: 7}
- {fileID: 8}
m_Selected: 0
m_LastSelected: 0
m_LastSelected: 1
--- !u!114 &7
MonoBehaviour:
m_ObjectHideFlags: 52
@ -274,7 +275,7 @@ MonoBehaviour:
serializedVersion: 2
x: 0
y: 455.2
width: 301.4
width: 303
height: 328.19998
m_ViewDataDictionary: {fileID: 0}
m_OverlayCanvas:
@ -292,7 +293,8 @@ MonoBehaviour:
m_ShowAllHits: 0
m_SkipHidden: 0
m_SearchArea: 1
m_Folders: []
m_Folders:
- Assets/Prefabs/Camera
m_Globs: []
m_OriginalText:
m_ViewMode: 0
@ -306,7 +308,7 @@ MonoBehaviour:
scrollPos: {x: 0, y: 0}
m_SelectedIDs: dc3c0000
m_LastClickedID: 15580
m_ExpandedIDs: ffffffff00000000826300008463000086630000886300008a6300008c6300008e630000906300009263000094630000e0630000
m_ExpandedIDs: ffffffff00000000686300006a6300006c6300006e63000070630000726300007463000076630000786300007a630000
m_RenameOverlay:
m_UserAcceptedRename: 0
m_Name:
@ -331,10 +333,10 @@ MonoBehaviour:
m_Icon: {fileID: 0}
m_ResourceFile:
m_AssetTreeState:
scrollPos: {x: 0, y: 133.50006}
m_SelectedIDs:
scrollPos: {x: 0, y: 0}
m_SelectedIDs: fc620000
m_LastClickedID: 0
m_ExpandedIDs: ffffffff00000000826300008463000086630000886300008a6300008c6300008e630000906300009263000094630000e0630000
m_ExpandedIDs: ffffffff00000000686300006a6300006c6300006e63000070630000726300007463000076630000786300007a6300006a7d0000
m_RenameOverlay:
m_UserAcceptedRename: 0
m_Name:
@ -350,7 +352,7 @@ MonoBehaviour:
m_IsRenaming: 0
m_OriginalEventType: 11
m_IsRenamingFilename: 1
m_ClientGUIView: {fileID: 0}
m_ClientGUIView: {fileID: 10}
m_SearchString:
m_CreateAssetUtility:
m_EndAction: {fileID: 0}
@ -359,8 +361,8 @@ MonoBehaviour:
m_Icon: {fileID: 0}
m_ResourceFile:
m_ListAreaState:
m_SelectedInstanceIDs:
m_LastClickedInstanceID: 0
m_SelectedInstanceIDs: fc620000
m_LastClickedInstanceID: 25340
m_HadKeyboardFocusLastEvent: 0
m_ExpandedInstanceIDs: c6230000d03c0000
m_RenameOverlay:
@ -391,6 +393,34 @@ MonoBehaviour:
m_SkipHiddenPackages: 0
m_DirectoriesAreaWidth: 170
--- !u!114 &8
MonoBehaviour:
m_ObjectHideFlags: 52
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 1
m_Script: {fileID: 12003, guid: 0000000000000000e000000000000000, type: 0}
m_Name:
m_EditorClassIdentifier:
m_MinSize: {x: 100, y: 100}
m_MaxSize: {x: 4000, y: 4000}
m_TitleContent:
m_Text: Console
m_Image: {fileID: -4950941429401207979, guid: 0000000000000000d000000000000000, type: 0}
m_Tooltip:
m_Pos:
serializedVersion: 2
x: 0
y: 455.2
width: 303
height: 328.19998
m_ViewDataDictionary: {fileID: 0}
m_OverlayCanvas:
m_LastAppliedPresetName: Default
m_SaveData: []
--- !u!114 &9
MonoBehaviour:
m_ObjectHideFlags: 52
m_CorrespondingSourceObject: {fileID: 0}
@ -403,19 +433,19 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_Children:
- {fileID: 9}
- {fileID: 11}
- {fileID: 10}
- {fileID: 12}
m_Position:
serializedVersion: 2
x: 302.4
x: 304
y: 0
width: 881.6
width: 880
height: 730.8
m_MinSize: {x: 100, y: 200}
m_MaxSize: {x: 8096, y: 16192}
vertical: 1
controlID: 28006
--- !u!114 &9
controlID: 590
--- !u!114 &10
MonoBehaviour:
m_ObjectHideFlags: 52
m_CorrespondingSourceObject: {fileID: 0}
@ -425,24 +455,23 @@ MonoBehaviour:
m_Enabled: 1
m_EditorHideFlags: 1
m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0}
m_Name: GameView
m_Name: SceneView
m_EditorClassIdentifier:
m_Children: []
m_Position:
serializedVersion: 2
x: 0
y: 0
width: 881.6
height: 514.4
m_MinSize: {x: 200, y: 200}
m_MaxSize: {x: 4000, y: 4000}
m_ActualView: {fileID: 2}
width: 880
height: 399.2
m_MinSize: {x: 202, y: 221}
m_MaxSize: {x: 4002, y: 4021}
m_ActualView: {fileID: 11}
m_Panes:
- {fileID: 10}
- {fileID: 2}
m_Selected: 1
- {fileID: 11}
m_Selected: 0
m_LastSelected: 0
--- !u!114 &10
--- !u!114 &11
MonoBehaviour:
m_ObjectHideFlags: 52
m_CorrespondingSourceObject: {fileID: 0}
@ -462,10 +491,10 @@ MonoBehaviour:
m_Tooltip:
m_Pos:
serializedVersion: 2
x: 706.4
y: 80.8
width: 590
height: 487.8
x: 304
y: 73.6
width: 878
height: 378.2
m_ViewDataDictionary: {fileID: 0}
m_OverlayCanvas:
m_LastAppliedPresetName: Default
@ -573,7 +602,7 @@ MonoBehaviour:
containerId: overlay-container--right
floating: 0
collapsed: 0
displayed: 0
displayed: 1
snapOffset: {x: 0, y: 0}
snapOffsetDelta: {x: 0, y: 0}
snapCorner: 0
@ -689,9 +718,9 @@ MonoBehaviour:
m_PlayAudio: 0
m_AudioPlay: 0
m_Position:
m_Target: {x: -13.357433, y: 3.264308, z: -0.07245366}
m_Target: {x: -22.25675, y: 3.3307502, z: -0.10363128}
speed: 2
m_Value: {x: -13.357433, y: 3.264308, z: -0.07245366}
m_Value: {x: -22.25675, y: 3.3307502, z: -0.10363128}
m_RenderMode: 0
m_CameraMode:
drawMode: 0
@ -742,9 +771,9 @@ MonoBehaviour:
speed: 2
m_Value: {x: 0, y: 0, z: 0, w: 1}
m_Size:
m_Target: 13.677304
m_Target: 15.237701
speed: 2
m_Value: 13.677304
m_Value: 15.237701
m_Ortho:
m_Target: 1
speed: 2
@ -769,7 +798,7 @@ MonoBehaviour:
m_SceneVisActive: 1
m_LastLockedObject: {fileID: 0}
m_ViewIsLockedToObject: 0
--- !u!114 &11
--- !u!114 &12
MonoBehaviour:
m_ObjectHideFlags: 52
m_CorrespondingSourceObject: {fileID: 0}
@ -779,50 +808,22 @@ MonoBehaviour:
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0}
m_Name: ConsoleWindow
m_Name: GameView
m_EditorClassIdentifier:
m_Children: []
m_Position:
serializedVersion: 2
x: 0
y: 514.4
width: 881.6
height: 216.39996
m_MinSize: {x: 100, y: 100}
y: 399.2
width: 880
height: 331.59998
m_MinSize: {x: 200, y: 200}
m_MaxSize: {x: 4000, y: 4000}
m_ActualView: {fileID: 12}
m_ActualView: {fileID: 2}
m_Panes:
- {fileID: 12}
- {fileID: 2}
m_Selected: 0
m_LastSelected: 0
--- !u!114 &12
MonoBehaviour:
m_ObjectHideFlags: 52
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 1
m_Script: {fileID: 12003, guid: 0000000000000000e000000000000000, type: 0}
m_Name:
m_EditorClassIdentifier:
m_MinSize: {x: 100, y: 100}
m_MaxSize: {x: 4000, y: 4000}
m_TitleContent:
m_Text: Console
m_Image: {fileID: -4950941429401207979, guid: 0000000000000000d000000000000000, type: 0}
m_Tooltip:
m_Pos:
serializedVersion: 2
x: 302.4
y: 588
width: 879.6
height: 195.39996
m_ViewDataDictionary: {fileID: 0}
m_OverlayCanvas:
m_LastAppliedPresetName: Default
m_SaveData: []
--- !u!114 &13
MonoBehaviour:
m_ObjectHideFlags: 52
@ -842,8 +843,8 @@ MonoBehaviour:
y: 0
width: 352
height: 730.8
m_MinSize: {x: 275, y: 50}
m_MaxSize: {x: 4000, y: 4000}
m_MinSize: {x: 276, y: 71}
m_MaxSize: {x: 4001, y: 4021}
m_ActualView: {fileID: 14}
m_Panes:
- {fileID: 14}
@ -883,8 +884,8 @@ MonoBehaviour:
m_CachedPref: 160
m_ControlHash: -371814159
m_PrefName: Preview_InspectorPreview
m_LastInspectedObjectInstanceID: -1
m_LastVerticalScrollValue: 0
m_LastInspectedObjectInstanceID: 25340
m_LastVerticalScrollValue: 294.40002
m_GlobalObjectId:
m_InspectorMode: 0
m_LockTracker: