diff --git a/Assets/Models/Mountain Terrain.asset b/Assets/Models/Mountain Terrain.asset index a8287e6..1ffc264 100644 Binary files a/Assets/Models/Mountain Terrain.asset and b/Assets/Models/Mountain Terrain.asset differ diff --git a/Assets/Scenes/Demos/graybox scene.unity b/Assets/Scenes/Demos/graybox scene.unity index f036688..e786013 100644 --- a/Assets/Scenes/Demos/graybox scene.unity +++ b/Assets/Scenes/Demos/graybox scene.unity @@ -1290,7 +1290,7 @@ Transform: m_LocalScale: {x: 0.7111871, y: 0.039395437, z: 0.7532221} m_Children: [] m_Father: {fileID: 83398732} - m_RootOrder: 3 + m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!65 &38709913 BoxCollider: @@ -2838,7 +2838,6 @@ Transform: m_LocalScale: {x: 23.903923, y: 25.38365, z: 27.557295} m_Children: - {fileID: 459914251} - - {fileID: 1357904548} - {fileID: 1445285822} - {fileID: 38709912} - {fileID: 332928270} @@ -4207,7 +4206,7 @@ Transform: m_LocalScale: {x: 0.7111871, y: 0.039395437, z: 0.7532221} m_Children: [] m_Father: {fileID: 83398732} - m_RootOrder: 11 + m_RootOrder: 10 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!65 &141927841 BoxCollider: @@ -4651,6 +4650,101 @@ MeshFilter: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 151849003} m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &160376463 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 160376464} + - component: {fileID: 160376467} + - component: {fileID: 160376466} + - component: {fileID: 160376465} + m_Layer: 0 + m_Name: Cube (13) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &160376464 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 160376463} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -718, y: 496.79285, z: -1895.2} + m_LocalScale: {x: 91.217926, y: 0.6129326, z: 53.676586} + m_Children: [] + m_Father: {fileID: 660207712} + m_RootOrder: 36 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!65 &160376465 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 160376463} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &160376466 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 160376463} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 730a2ba314caf9742823631b050afe28, type: 2} + 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: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &160376467 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 160376463} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} --- !u!1 &161460413 GameObject: m_ObjectHideFlags: 0 @@ -6944,7 +7038,7 @@ Transform: m_LocalScale: {x: 0.7111871, y: 0.039395437, z: 0.7532221} m_Children: [] m_Father: {fileID: 83398732} - m_RootOrder: 10 + m_RootOrder: 9 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!65 &267806918 BoxCollider: @@ -8398,7 +8492,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 321488604} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: -718, y: 496.79285, z: -1840.433} + m_LocalPosition: {x: -718, y: 496.79285, z: -1895.2} m_LocalScale: {x: 91.217926, y: 0.6129326, z: 53.676586} m_Children: [] m_Father: {fileID: 660207712} @@ -8877,7 +8971,7 @@ Transform: m_LocalScale: {x: 0.7111871, y: 0.039395437, z: 0.7532221} m_Children: [] m_Father: {fileID: 83398732} - m_RootOrder: 4 + m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!65 &332928271 BoxCollider: @@ -9178,6 +9272,17 @@ Transform: m_Father: {fileID: 831351887} m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &348746306 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 7097691538269713306, guid: 362ca97b75c291a47ab81d628a81f440, type: 3} + m_PrefabInstance: {fileID: 1448239903} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5a5d879591af1084ab5d3a35fcd53086, type: 3} + m_Name: + m_EditorClassIdentifier: --- !u!1 &353209029 GameObject: m_ObjectHideFlags: 0 @@ -11191,7 +11296,7 @@ Transform: m_LocalScale: {x: 17.000162, y: 1, z: 20.756763} m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 1 + m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &459914250 GameObject: @@ -12604,7 +12709,7 @@ Transform: m_LocalScale: {x: 0.7111871, y: 0.039395437, z: 0.7532221} m_Children: [] m_Father: {fileID: 83398732} - m_RootOrder: 15 + m_RootOrder: 14 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!65 &520122956 BoxCollider: @@ -13722,8 +13827,8 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 563467448} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: -628, y: 496.79285, z: -1840.433} - m_LocalScale: {x: 91.217926, y: 0.6129326, z: 53.676586} + m_LocalPosition: {x: -628, y: 496.79285, z: -1885.1351} + m_LocalScale: {x: 91.217926, y: 0.6129326, z: 74.003914} m_Children: [] m_Father: {fileID: 660207712} m_RootOrder: 2 @@ -13916,7 +14021,7 @@ Transform: m_LocalScale: {x: 0.7111871, y: 0.039395437, z: 0.7532221} m_Children: [] m_Father: {fileID: 83398732} - m_RootOrder: 13 + m_RootOrder: 12 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!65 &577628232 BoxCollider: @@ -15857,6 +15962,8 @@ Transform: - {fileID: 393688891} - {fileID: 9822248} - {fileID: 330796191} + - {fileID: 160376464} + - {fileID: 908858763} m_Father: {fileID: 1385949117} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -16850,7 +16957,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 689426366} m_LocalRotation: {x: -0, y: 0.79767233, z: -0, w: 0.6030911} - m_LocalPosition: {x: -5.0606127, y: 109.47375, z: 1.9640756} + m_LocalPosition: {x: -5.0606127, y: 105.5, z: 1.9640756} m_LocalScale: {x: 0.35149136, y: 1.6315006, z: 0.3909429} m_Children: - {fileID: 922883952} @@ -17014,79 +17121,6 @@ MeshFilter: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 690914991} m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!1001 &692225425 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - m_TransformParent: {fileID: 0} - m_Modifications: - - target: {fileID: 701079060217590907, guid: a9840baa4cc526b44bfef27c6fea042a, type: 3} - propertyPath: m_Enabled - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3725107173017604129, guid: a9840baa4cc526b44bfef27c6fea042a, type: 3} - propertyPath: items.Array.size - value: 2 - objectReference: {fileID: 0} - - target: {fileID: 3725107173017604129, guid: a9840baa4cc526b44bfef27c6fea042a, type: 3} - propertyPath: items.Array.data[0] - value: - objectReference: {fileID: 11400000, guid: f3ec80a746c12614db0a11da845e3815, type: 2} - - target: {fileID: 3725107173017604129, guid: a9840baa4cc526b44bfef27c6fea042a, type: 3} - propertyPath: items.Array.data[1] - value: - objectReference: {fileID: 11400000, guid: b91f668477f6b3244b3fea3204e6cd87, type: 2} - - target: {fileID: 7188906082087890177, guid: a9840baa4cc526b44bfef27c6fea042a, type: 3} - propertyPath: m_RootOrder - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7188906082087890177, guid: a9840baa4cc526b44bfef27c6fea042a, type: 3} - propertyPath: m_LocalPosition.x - value: 890.2 - objectReference: {fileID: 0} - - target: {fileID: 7188906082087890177, guid: a9840baa4cc526b44bfef27c6fea042a, type: 3} - propertyPath: m_LocalPosition.y - value: 18.3 - objectReference: {fileID: 0} - - target: {fileID: 7188906082087890177, guid: a9840baa4cc526b44bfef27c6fea042a, type: 3} - propertyPath: m_LocalPosition.z - value: 551 - objectReference: {fileID: 0} - - target: {fileID: 7188906082087890177, guid: a9840baa4cc526b44bfef27c6fea042a, type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 7188906082087890177, guid: a9840baa4cc526b44bfef27c6fea042a, type: 3} - propertyPath: m_LocalRotation.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7188906082087890177, guid: a9840baa4cc526b44bfef27c6fea042a, type: 3} - propertyPath: m_LocalRotation.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7188906082087890177, guid: a9840baa4cc526b44bfef27c6fea042a, type: 3} - propertyPath: m_LocalRotation.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7188906082087890177, guid: a9840baa4cc526b44bfef27c6fea042a, type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7188906082087890177, guid: a9840baa4cc526b44bfef27c6fea042a, type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7188906082087890177, guid: a9840baa4cc526b44bfef27c6fea042a, type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7188906082087890184, guid: a9840baa4cc526b44bfef27c6fea042a, type: 3} - propertyPath: m_Name - value: PlayerPrefab - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: a9840baa4cc526b44bfef27c6fea042a, type: 3} --- !u!1 &699561638 GameObject: m_ObjectHideFlags: 0 @@ -18450,7 +18484,7 @@ Transform: m_LocalScale: {x: 0.7111871, y: 0.039395437, z: 0.7532221} m_Children: [] m_Father: {fileID: 83398732} - m_RootOrder: 6 + m_RootOrder: 5 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!65 &753929843 BoxCollider: @@ -19320,7 +19354,7 @@ Transform: m_LocalScale: {x: 18.625084, y: 1.21024, z: 3.3996985} m_Children: [] m_Father: {fileID: 83398732} - m_RootOrder: 18 + m_RootOrder: 17 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!65 &775561294 BoxCollider: @@ -21895,7 +21929,7 @@ Transform: m_LocalScale: {x: 0.7111871, y: 0.039395437, z: 0.7532221} m_Children: [] m_Father: {fileID: 83398732} - m_RootOrder: 8 + m_RootOrder: 7 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!65 &839002975 BoxCollider: @@ -22081,8 +22115,8 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 845150773} m_LocalRotation: {x: -0, y: -0, z: 0.23706186, w: 0.97149456} - m_LocalPosition: {x: -845, y: 454.79285, z: -1844.4537} - m_LocalScale: {x: 182.71585, y: 0.7204257, z: 45.37092} + m_LocalPosition: {x: -850.6033, y: 451.8852, z: -1894.2522} + m_LocalScale: {x: 195.35193, y: 0.7204257, z: 53.274536} m_Children: [] m_Father: {fileID: 660207712} m_RootOrder: 1 @@ -24074,6 +24108,101 @@ MeshFilter: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 895356427} m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &908858762 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 908858763} + - component: {fileID: 908858766} + - component: {fileID: 908858765} + - component: {fileID: 908858764} + m_Layer: 0 + m_Name: Cube (22) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &908858763 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 908858762} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -981.1, y: 407, z: -1893.9} + m_LocalScale: {x: 91.217926, y: 0.6129326, z: 53.676586} + m_Children: [] + m_Father: {fileID: 660207712} + m_RootOrder: 37 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!65 &908858764 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 908858762} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &908858765 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 908858762} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 730a2ba314caf9742823631b050afe28, type: 2} + 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: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &908858766 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 908858762} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} --- !u!1 &913494957 GameObject: m_ObjectHideFlags: 0 @@ -28210,8 +28339,8 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1120569601} m_LocalRotation: {x: -0, y: -0, z: 0.21491422, w: 0.97663295} - m_LocalPosition: {x: -542, y: 515.79285, z: -1836.7821} - m_LocalScale: {x: 91.217926, y: 0.6129326, z: 60.976604} + m_LocalPosition: {x: -542, y: 515.79285, z: -1869.1282} + m_LocalScale: {x: 91.217926, y: 0.6129326, z: 106.11759} m_Children: [] m_Father: {fileID: 660207712} m_RootOrder: 3 @@ -29214,7 +29343,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1165668555} m_LocalRotation: {x: -0, y: 0.79767233, z: -0, w: 0.6030911} - m_LocalPosition: {x: -4.9651423, y: 97.400604, z: 2.3045297} + m_LocalPosition: {x: -4.9651423, y: 91.3, z: 2.3045297} m_LocalScale: {x: 0.35149136, y: 1.6315006, z: 0.3909429} m_Children: - {fileID: 942155473} @@ -29439,7 +29568,7 @@ Transform: m_LocalScale: {x: 0.7111871, y: 0.039395437, z: 0.7532221} m_Children: [] m_Father: {fileID: 83398732} - m_RootOrder: 16 + m_RootOrder: 15 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!65 &1171749853 BoxCollider: @@ -31947,101 +32076,6 @@ MeshFilter: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1357026191} m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!1 &1357904547 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1357904548} - - component: {fileID: 1357904551} - - component: {fileID: 1357904550} - - component: {fileID: 1357904549} - m_Layer: 0 - m_Name: platform 1 (1) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1357904548 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1357904547} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 14.04, y: -0.39, z: -1.42} - m_LocalScale: {x: 0.7111871, y: 0.039395437, z: 0.7532221} - m_Children: [] - m_Father: {fileID: 83398732} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!65 &1357904549 -BoxCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1357904547} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Size: {x: 1, y: 1, z: 1} - m_Center: {x: 0, y: 0, z: 0} ---- !u!23 &1357904550 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1357904547} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 2100000, guid: cce4d03b83d5bb44682271d375de60ff, type: 2} - 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: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!33 &1357904551 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1357904547} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} --- !u!1 &1358030681 GameObject: m_ObjectHideFlags: 0 @@ -32931,17 +32965,6 @@ MeshFilter: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1392432722} m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!114 &1395410201 stripped -MonoBehaviour: - m_CorrespondingSourceObject: {fileID: 3725107173017604129, guid: a9840baa4cc526b44bfef27c6fea042a, type: 3} - m_PrefabInstance: {fileID: 692225425} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 5a5d879591af1084ab5d3a35fcd53086, type: 3} - m_Name: - m_EditorClassIdentifier: --- !u!1 &1396239062 GameObject: m_ObjectHideFlags: 0 @@ -33733,7 +33756,7 @@ Transform: m_LocalScale: {x: 0.7111871, y: 0.039395437, z: 0.7532221} m_Children: [] m_Father: {fileID: 83398732} - m_RootOrder: 9 + m_RootOrder: 8 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!65 &1429730050 BoxCollider: @@ -34048,7 +34071,7 @@ Transform: m_LocalScale: {x: 0.7111871, y: 0.039395437, z: 0.7532221} m_Children: [] m_Father: {fileID: 83398732} - m_RootOrder: 2 + m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!65 &1445285823 BoxCollider: @@ -34112,6 +34135,71 @@ MeshFilter: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1445285821} m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1001 &1448239903 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 5633209979457551608, guid: 362ca97b75c291a47ab81d628a81f440, type: 3} + propertyPath: m_Name + value: DebugPlayerPrefab + objectReference: {fileID: 0} + - target: {fileID: 5784126162129930074, guid: 362ca97b75c291a47ab81d628a81f440, type: 3} + propertyPath: dashItem + value: + objectReference: {fileID: 11400000, guid: 4399d7276b3edf446ac51c5145539a5e, type: 2} + - target: {fileID: 6926740475113451123, guid: 362ca97b75c291a47ab81d628a81f440, type: 3} + propertyPath: m_RootOrder + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6926740475113451123, guid: 362ca97b75c291a47ab81d628a81f440, type: 3} + propertyPath: m_LocalPosition.x + value: 892.84863 + objectReference: {fileID: 0} + - target: {fileID: 6926740475113451123, guid: 362ca97b75c291a47ab81d628a81f440, type: 3} + propertyPath: m_LocalPosition.y + value: 38.340515 + objectReference: {fileID: 0} + - target: {fileID: 6926740475113451123, guid: 362ca97b75c291a47ab81d628a81f440, type: 3} + propertyPath: m_LocalPosition.z + value: 549.8851 + objectReference: {fileID: 0} + - target: {fileID: 6926740475113451123, guid: 362ca97b75c291a47ab81d628a81f440, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6926740475113451123, guid: 362ca97b75c291a47ab81d628a81f440, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6926740475113451123, guid: 362ca97b75c291a47ab81d628a81f440, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6926740475113451123, guid: 362ca97b75c291a47ab81d628a81f440, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6926740475113451123, guid: 362ca97b75c291a47ab81d628a81f440, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6926740475113451123, guid: 362ca97b75c291a47ab81d628a81f440, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6926740475113451123, guid: 362ca97b75c291a47ab81d628a81f440, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7616279934999327372, guid: 362ca97b75c291a47ab81d628a81f440, type: 3} + propertyPath: nitroItem + value: + objectReference: {fileID: 11400000, guid: b91f668477f6b3244b3fea3204e6cd87, type: 2} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 362ca97b75c291a47ab81d628a81f440, type: 3} --- !u!1 &1457776488 GameObject: m_ObjectHideFlags: 0 @@ -35601,7 +35689,7 @@ Transform: m_LocalScale: {x: 0.7111871, y: 0.039395437, z: 0.7532221} m_Children: [] m_Father: {fileID: 83398732} - m_RootOrder: 14 + m_RootOrder: 13 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!65 &1543067484 BoxCollider: @@ -37035,7 +37123,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1596573753} m_LocalRotation: {x: -0, y: 0.41664216, z: -0, w: 0.9090706} - m_LocalPosition: {x: -231.61304, y: -1166.8, z: 484.46008} + m_LocalPosition: {x: -231.61304, y: -1171.9, z: 484.46008} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 305860925} @@ -37820,7 +37908,7 @@ Transform: m_LocalScale: {x: 0.7111871, y: 0.039395437, z: 0.7532221} m_Children: [] m_Father: {fileID: 83398732} - m_RootOrder: 12 + m_RootOrder: 11 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!65 &1638860077 BoxCollider: @@ -38703,8 +38791,8 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1673654440} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: -455, y: 534.79285, z: -1826.3632} - m_LocalScale: {x: 91.217926, y: 0.6129326, z: 81.81404} + m_LocalPosition: {x: -455, y: 534.79285, z: -1853.4542} + m_LocalScale: {x: 91.217926, y: 0.6129326, z: 135.99948} m_Children: [] m_Father: {fileID: 660207712} m_RootOrder: 4 @@ -39774,7 +39862,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1730720747} m_LocalRotation: {x: -0, y: 0.79767233, z: -0, w: 0.6030911} - m_LocalPosition: {x: -5.3891253, y: 119.425865, z: 1.6474376} + m_LocalPosition: {x: -5.3891253, y: 117.6, z: 1.6474376} m_LocalScale: {x: 0.35149136, y: 1.6315006, z: 0.3909429} m_Children: - {fileID: 225075931} @@ -39955,7 +40043,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 6c342edd8126e1449a50220a14c9333e, type: 3} m_Name: m_EditorClassIdentifier: - Inv: {fileID: 1395410201} + Inv: {fileID: 348746306} uiPrebab: {fileID: 2234979236645149946, guid: 757a136ec05bee247970d9f727f6b5f2, type: 3} --- !u!1 &1734064827 GameObject: @@ -42584,7 +42672,7 @@ Transform: m_LocalScale: {x: 0.7111871, y: 0.039395437, z: 0.7532221} m_Children: [] m_Father: {fileID: 83398732} - m_RootOrder: 5 + m_RootOrder: 4 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!65 &1812977153 BoxCollider: @@ -44389,7 +44477,7 @@ Transform: m_LocalScale: {x: 0.7111871, y: 0.039395437, z: 0.7532221} m_Children: [] m_Father: {fileID: 83398732} - m_RootOrder: 17 + m_RootOrder: 16 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!65 &1882941773 BoxCollider: @@ -47885,7 +47973,7 @@ Transform: m_LocalScale: {x: 0.7111871, y: 0.039395437, z: 0.7532221} m_Children: [] m_Father: {fileID: 83398732} - m_RootOrder: 7 + m_RootOrder: 6 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!65 &2003687075 BoxCollider: @@ -48552,7 +48640,7 @@ Transform: m_LocalScale: {x: 18.625084, y: 1.21024, z: 3.3996985} m_Children: [] m_Father: {fileID: 83398732} - m_RootOrder: 19 + m_RootOrder: 18 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!65 &2025364231 BoxCollider: @@ -50010,7 +50098,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2081358416} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 14.04, y: -0.426, z: -1.42} + m_LocalPosition: {x: 14.04, y: 0.59, z: -1.42} m_LocalScale: {x: 0.7111871, y: 0.039395437, z: 0.7532221} m_Children: [] m_Father: {fileID: 1669534897} diff --git a/Assets/Scripts/ControllsGamePadControlls.cs b/Assets/Scripts/ControllsGamePadControlls.cs deleted file mode 100644 index efbf937..0000000 --- a/Assets/Scripts/ControllsGamePadControlls.cs +++ /dev/null @@ -1,132 +0,0 @@ -// GENERATED AUTOMATICALLY FROM 'Assets/Scripts/ControllsGamePadControlls.inputactions' - -using System; -using System.Collections; -using System.Collections.Generic; -using UnityEngine.InputSystem; -using UnityEngine.InputSystem.Utilities; - -public class @ControllsGamePadControlls : IInputActionCollection, IDisposable -{ - public InputActionAsset asset { get; } - public @ControllsGamePadControlls() - { - asset = InputActionAsset.FromJson(@"{ - ""name"": ""ControllsGamePadControlls"", - ""maps"": [ - { - ""name"": ""RunnerGamePad"", - ""id"": ""04979d69-e216-469f-817d-0a874e345751"", - ""actions"": [ - { - ""name"": ""Jump"", - ""type"": ""Button"", - ""id"": ""7a804743-c0f5-41cc-af8d-d108aa08c712"", - ""expectedControlType"": ""Button"", - ""processors"": """", - ""interactions"": """" - } - ], - ""bindings"": [ - { - ""name"": """", - ""id"": ""8a6737f7-66b7-4bdb-a7f4-822c756a7b53"", - ""path"": ""/buttonSouth"", - ""interactions"": """", - ""processors"": """", - ""groups"": """", - ""action"": ""Jump"", - ""isComposite"": false, - ""isPartOfComposite"": false - } - ] - } - ], - ""controlSchemes"": [] -}"); - // RunnerGamePad - m_RunnerGamePad = asset.FindActionMap("RunnerGamePad", throwIfNotFound: true); - m_RunnerGamePad_Jump = m_RunnerGamePad.FindAction("Jump", throwIfNotFound: true); - } - - public void Dispose() - { - UnityEngine.Object.Destroy(asset); - } - - public InputBinding? bindingMask - { - get => asset.bindingMask; - set => asset.bindingMask = value; - } - - public ReadOnlyArray? devices - { - get => asset.devices; - set => asset.devices = value; - } - - public ReadOnlyArray controlSchemes => asset.controlSchemes; - - public bool Contains(InputAction action) - { - return asset.Contains(action); - } - - public IEnumerator GetEnumerator() - { - return asset.GetEnumerator(); - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetEnumerator(); - } - - public void Enable() - { - asset.Enable(); - } - - public void Disable() - { - asset.Disable(); - } - - // RunnerGamePad - private readonly InputActionMap m_RunnerGamePad; - private IRunnerGamePadActions m_RunnerGamePadActionsCallbackInterface; - private readonly InputAction m_RunnerGamePad_Jump; - public struct RunnerGamePadActions - { - private @ControllsGamePadControlls m_Wrapper; - public RunnerGamePadActions(@ControllsGamePadControlls wrapper) { m_Wrapper = wrapper; } - public InputAction @Jump => m_Wrapper.m_RunnerGamePad_Jump; - public InputActionMap Get() { return m_Wrapper.m_RunnerGamePad; } - public void Enable() { Get().Enable(); } - public void Disable() { Get().Disable(); } - public bool enabled => Get().enabled; - public static implicit operator InputActionMap(RunnerGamePadActions set) { return set.Get(); } - public void SetCallbacks(IRunnerGamePadActions instance) - { - if (m_Wrapper.m_RunnerGamePadActionsCallbackInterface != null) - { - @Jump.started -= m_Wrapper.m_RunnerGamePadActionsCallbackInterface.OnJump; - @Jump.performed -= m_Wrapper.m_RunnerGamePadActionsCallbackInterface.OnJump; - @Jump.canceled -= m_Wrapper.m_RunnerGamePadActionsCallbackInterface.OnJump; - } - m_Wrapper.m_RunnerGamePadActionsCallbackInterface = instance; - if (instance != null) - { - @Jump.started += instance.OnJump; - @Jump.performed += instance.OnJump; - @Jump.canceled += instance.OnJump; - } - } - } - public RunnerGamePadActions @RunnerGamePad => new RunnerGamePadActions(this); - public interface IRunnerGamePadActions - { - void OnJump(InputAction.CallbackContext context); - } -} diff --git a/Assets/Scripts/ControllsGamePadControlls.cs.meta b/Assets/Scripts/ControllsGamePadControlls.cs.meta deleted file mode 100644 index a503fd0..0000000 --- a/Assets/Scripts/ControllsGamePadControlls.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 2fa44697960ae5f41bd367e6d38531ab -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/PlayerScripts/DebugPlayer/DebugItems/dDash.cs b/Assets/Scripts/PlayerScripts/DebugPlayer/DebugItems/dDash.cs index e37d701..a645ffc 100644 --- a/Assets/Scripts/PlayerScripts/DebugPlayer/DebugItems/dDash.cs +++ b/Assets/Scripts/PlayerScripts/DebugPlayer/DebugItems/dDash.cs @@ -10,6 +10,8 @@ public class dDash : NetworkBehaviour{ public const float maxDashTime = 1.0f; public float dashDistance = 10; public float dashStoppingSpeed = 0.1f; + public SpecialItem dashItem; + private bool isOnCoolDown = false; float currentDashTime = maxDashTime; float dashSpeed = 12; @@ -23,9 +25,10 @@ public class dDash : NetworkBehaviour{ void FixedUpdate(){ //if (!IsLocalPlayer) { return; } if(characterController.enabled == true){ - if (Input.GetKeyDown(KeyCode.E)) + if (Input.GetKeyDown(KeyCode.E) && isOnCoolDown == false) { - currentDashTime = 0; + currentDashTime = 0; + StartCoroutine(startCoolDown()); } if(currentDashTime < maxDashTime) { @@ -40,4 +43,13 @@ public class dDash : NetworkBehaviour{ } } + private IEnumerator startCoolDown(){ + Debug.Log("start corotine"); + isOnCoolDown = true; + //driver.startUICooldown("Nitro"); + yield return new WaitForSeconds(dashItem.cooldownM); + isOnCoolDown = false; + Debug.Log("end corotine"); + } + } \ No newline at end of file diff --git a/Assets/Scripts/PlayerScripts/DebugPlayer/DebugItems/dGrapplingHook.cs b/Assets/Scripts/PlayerScripts/DebugPlayer/DebugItems/dGrapplingHook.cs index 175808d..daecd19 100644 --- a/Assets/Scripts/PlayerScripts/DebugPlayer/DebugItems/dGrapplingHook.cs +++ b/Assets/Scripts/PlayerScripts/DebugPlayer/DebugItems/dGrapplingHook.cs @@ -34,7 +34,8 @@ public class dGrapplingHook : NetworkBehaviour { //if (!IsLocalPlayer) { return; } - if (Input.GetKeyDown(KeyCode.E)) //If grapple button is hit + //if E or left face gamepad button is pressed is slightly pressed + if (Input.GetKeyDown(KeyCode.E) || Input.GetKeyDown(KeyCode.JoystickButton2)) //If grapple button is hit { if (!isGrappled) //If we are not grappling { @@ -60,7 +61,8 @@ public class dGrapplingHook : NetworkBehaviour { Debug.DrawRay(gameObject.transform.position, (hookPoint.transform.position - gameObject.transform.position)); //Visual of line - if (Input.GetKey(KeyCode.LeftShift)) //Extend hook + //if left shift or left bumper held down + if (Input.GetKey(KeyCode.LeftShift) || Input.GetKey(KeyCode.JoystickButton4)) //Extend hook { ropeLength += climbRate * Time.deltaTime; if (ropeLength > maxGrappleDistance) @@ -69,7 +71,7 @@ public class dGrapplingHook : NetworkBehaviour } //Debug.Log(ropeLength.ToString()); } - if (Input.GetKey(KeyCode.RightShift)) // Retract Hook + if (Input.GetKey(KeyCode.RightShift) || Input.GetKey(KeyCode.JoystickButton5)) // Retract Hook { ropeLength -= climbRate * Time.deltaTime; if (ropeLength < 5) diff --git a/Assets/Scripts/PlayerScripts/DebugPlayer/DebugItems/dKickController.cs b/Assets/Scripts/PlayerScripts/DebugPlayer/DebugItems/dKickController.cs index 6cc870c..8287eaf 100644 --- a/Assets/Scripts/PlayerScripts/DebugPlayer/DebugItems/dKickController.cs +++ b/Assets/Scripts/PlayerScripts/DebugPlayer/DebugItems/dKickController.cs @@ -28,7 +28,10 @@ public class dKickController : NetworkBehaviour } void Kick(){ - if (Input.GetKeyDown(KeyCode.F) && isKicking == false && characterController.isGrounded == false) + //Note: when we merge this into PlayerMovement, we may want to change isgrounded to our + //custom is grounded + //If F is pressed or gamepad right trigger is pulled + if ((Input.GetKeyDown(KeyCode.F) || Input.GetAxis("Kick") != 0) && isKicking == false && characterController.isGrounded == false) { Debug.Log("dive"); // if kicking in air, kick until grounded (maybe add some foward momentum if needeD) @@ -37,13 +40,14 @@ public class dKickController : NetworkBehaviour leg.SetActive(true); } //otherwise do ground kick for .3 seconds - else if (Input.GetKeyDown(KeyCode.F) && isKicking == false){ + else if ((Input.GetKeyDown(KeyCode.F) || Input.GetAxis("Kick") != 0) && isKicking == false){ Debug.Log("kick"); StartCoroutine(Kicking(.3f)); } //once dive kick touches ground, set back to normal state - if(characterController.isGrounded == true && isDiveKicking == true){ + if (characterController.isGrounded == true && isDiveKicking == true) + { isDiveKicking = false; isKicking = false; leg.SetActive(false); diff --git a/Assets/Scripts/PlayerScripts/DebugPlayer/dPlayerMovement.cs b/Assets/Scripts/PlayerScripts/DebugPlayer/dPlayerMovement.cs index 97cc6b4..355cc27 100644 --- a/Assets/Scripts/PlayerScripts/DebugPlayer/dPlayerMovement.cs +++ b/Assets/Scripts/PlayerScripts/DebugPlayer/dPlayerMovement.cs @@ -258,7 +258,7 @@ public class dPlayerMovement : NetworkBehaviour //Jump Function private void Jump() { - //If space is pressed apply an upwards force to the player + //If space/south gamepad button is pressed apply an upwards force to the player if (Input.GetAxis("Jump") != 0 && !jumpPressed && curJumpNum + 1 < pStats.JumpNum && !isSliding) { if(wallRun.IsWallRunning()){ @@ -280,7 +280,7 @@ public class dPlayerMovement : NetworkBehaviour curJumpNum = 0; } - //If space isn't being pressed then jump is false + //If space/south face gamepad button isn't being pressed then jump is false if (Input.GetAxis("Jump") == 0) jumpPressed = false; } @@ -311,16 +311,30 @@ public class dPlayerMovement : NetworkBehaviour //Camera and Player Rotation private void Rotation() { - Vector3 lastCamPos = new Vector3(0,0,0); - Vector3 rotOffset = transform.localEulerAngles; - if(moveController.enabled){ - transform.parent.Rotate(Vector3.up * sensitivity * Time.deltaTime * Input.GetAxis("Mouse X")); + //if input is received from Mouse X + if (Input.GetAxis("Mouse X") != 0) + { + transform.parent.Rotate(Vector3.up * sensitivity * Time.deltaTime * Input.GetAxis("Mouse X")); + } + //if input is received from right analog stick (horizontal) + else if (Input.GetAxis("HorizontalCam") != 0) + { + transform.parent.Rotate(Vector3.up * sensitivity * Time.deltaTime * Input.GetAxis("HorizontalCam")); + } - - camRotation.x -= Input.GetAxis("Mouse Y") * sensitivity * Time.deltaTime; - camRotation.x = Mathf.Clamp(camRotation.x, minAngle, maxAngle); - - cam.transform.localEulerAngles = camRotation; + //if input is if input is received from Mouse Y + if (Input.GetAxis("Mouse Y") != 0) + { + camRotation.x -= Input.GetAxis("Mouse Y") * sensitivity * Time.deltaTime; + camRotation.x = Mathf.Clamp(camRotation.x, minAngle, maxAngle); + cam.transform.localEulerAngles = camRotation; + } + //if input is received from right analog stick (vertical) + else if (Input.GetAxis("VerticalTurn") != 0) + { + camRotation.x -= Input.GetAxis("VerticalTurn") * sensitivity * Time.deltaTime; + camRotation.x = Mathf.Clamp(camRotation.x, minAngle, maxAngle); + cam.transform.localEulerAngles = camRotation; } } @@ -440,7 +454,8 @@ public class dPlayerMovement : NetworkBehaviour //Slide Function private void Slide(){ - if (Input.GetKey(KeyCode.Q)){ + //if the q button or the east face button on gamepad is held down + if (Input.GetKey(KeyCode.JoystickButton1) || Input.GetKey(KeyCode.Q)) { qDown = true; if (isSliding == false){ originalTraction = pStats.Traction; diff --git a/Assets/Scripts/PlayerScripts/KickController.cs b/Assets/Scripts/PlayerScripts/KickController.cs index bbfb748..50be26a 100644 --- a/Assets/Scripts/PlayerScripts/KickController.cs +++ b/Assets/Scripts/PlayerScripts/KickController.cs @@ -30,7 +30,8 @@ public class KickController : NetworkBehaviour void Kick(){ //Note: when we merge this into PlayerMovement, we may want to change isgrounded to our //custom is grounded - if (Input.GetKeyDown(KeyCode.F) && isKicking == false && characterController.isGrounded == false) + //If F is pressed or gamepad right trigger is pulled + if ((Input.GetKeyDown(KeyCode.F) || Input.GetAxis("Kick") != 0) && isKicking == false && characterController.isGrounded == false) { Debug.Log("dive"); // if kicking in air, kick until grounded (maybe add some foward momentum if needeD) @@ -39,7 +40,7 @@ public class KickController : NetworkBehaviour leg.SetActive(true); } //otherwise do ground kick for .3 seconds - else if (Input.GetKeyDown(KeyCode.F) && isKicking == false){ + else if (( Input.GetKeyDown(KeyCode.F) || Input.GetAxis("Kick") != 0) && isKicking == false){ Debug.Log("kick"); StartCoroutine(Kicking(.3f)); } diff --git a/Assets/Scripts/PlayerScripts/PlayerItems/ItemScripts/Dash.cs b/Assets/Scripts/PlayerScripts/PlayerItems/ItemScripts/Dash.cs index 43e6862..e1c7030 100644 --- a/Assets/Scripts/PlayerScripts/PlayerItems/ItemScripts/Dash.cs +++ b/Assets/Scripts/PlayerScripts/PlayerItems/ItemScripts/Dash.cs @@ -10,6 +10,8 @@ public class Dash : NetworkBehaviour { public const float maxDashTime = 1.0f; public float dashDistance = 10; public float dashStoppingSpeed = 0.1f; + public SpecialItem dashItem; + private bool isOnCoolDown = false; float currentDashTime = maxDashTime; float dashSpeed = 12; @@ -23,9 +25,10 @@ public class Dash : NetworkBehaviour { void FixedUpdate(){ if (!IsLocalPlayer) { return; } - if (Input.GetKeyDown(KeyCode.E)) + if (Input.GetKeyDown(KeyCode.E) && isOnCoolDown == false) { - currentDashTime = 0; + currentDashTime = 0; + StartCoroutine(startCoolDown()); } if(currentDashTime < maxDashTime) { @@ -36,7 +39,17 @@ public class Dash : NetworkBehaviour { { moveDirection = Vector3.zero; } + characterController.Move(moveDirection * Time.deltaTime * dashSpeed); } + private IEnumerator startCoolDown(){ + Debug.Log("start corotine"); + isOnCoolDown = true; + //driver.startUICooldown("Nitro"); + yield return new WaitForSeconds(dashItem.cooldownM); + isOnCoolDown = false; + Debug.Log("end corotine"); + } + } \ No newline at end of file diff --git a/Assets/Scripts/PlayerScripts/PlayerItems/ItemScripts/GamePadControlls.cs b/Assets/Scripts/PlayerScripts/PlayerItems/ItemScripts/GamePadControlls.cs deleted file mode 100644 index 77ce83a..0000000 --- a/Assets/Scripts/PlayerScripts/PlayerItems/ItemScripts/GamePadControlls.cs +++ /dev/null @@ -1,132 +0,0 @@ -// GENERATED AUTOMATICALLY FROM 'Assets/Scripts/PlayerScripts/MovementAbilities/GamePadControlls.inputactions' - -using System; -using System.Collections; -using System.Collections.Generic; -using UnityEngine.InputSystem; -using UnityEngine.InputSystem.Utilities; - -public class @GamePadControlls : IInputActionCollection, IDisposable -{ - public InputActionAsset asset { get; } - public @GamePadControlls() - { - asset = InputActionAsset.FromJson(@"{ - ""name"": ""GamePadControlls"", - ""maps"": [ - { - ""name"": ""Runner"", - ""id"": ""5b72a223-d8e7-4904-bda9-b7bc5bf92850"", - ""actions"": [ - { - ""name"": ""Jump"", - ""type"": ""Button"", - ""id"": ""bd111e05-cd62-4634-ac88-eb948971f528"", - ""expectedControlType"": ""Button"", - ""processors"": """", - ""interactions"": """" - } - ], - ""bindings"": [ - { - ""name"": """", - ""id"": ""9fde690f-bb27-4b3c-a7e4-4354283ff9da"", - ""path"": ""/buttonSouth"", - ""interactions"": """", - ""processors"": """", - ""groups"": """", - ""action"": ""Jump"", - ""isComposite"": false, - ""isPartOfComposite"": false - } - ] - } - ], - ""controlSchemes"": [] -}"); - // Runner - m_Runner = asset.FindActionMap("Runner", throwIfNotFound: true); - m_Runner_Jump = m_Runner.FindAction("Jump", throwIfNotFound: true); - } - - public void Dispose() - { - UnityEngine.Object.Destroy(asset); - } - - public InputBinding? bindingMask - { - get => asset.bindingMask; - set => asset.bindingMask = value; - } - - public ReadOnlyArray? devices - { - get => asset.devices; - set => asset.devices = value; - } - - public ReadOnlyArray controlSchemes => asset.controlSchemes; - - public bool Contains(InputAction action) - { - return asset.Contains(action); - } - - public IEnumerator GetEnumerator() - { - return asset.GetEnumerator(); - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetEnumerator(); - } - - public void Enable() - { - asset.Enable(); - } - - public void Disable() - { - asset.Disable(); - } - - // Runner - private readonly InputActionMap m_Runner; - private IRunnerActions m_RunnerActionsCallbackInterface; - private readonly InputAction m_Runner_Jump; - public struct RunnerActions - { - private @GamePadControlls m_Wrapper; - public RunnerActions(@GamePadControlls wrapper) { m_Wrapper = wrapper; } - public InputAction @Jump => m_Wrapper.m_Runner_Jump; - public InputActionMap Get() { return m_Wrapper.m_Runner; } - public void Enable() { Get().Enable(); } - public void Disable() { Get().Disable(); } - public bool enabled => Get().enabled; - public static implicit operator InputActionMap(RunnerActions set) { return set.Get(); } - public void SetCallbacks(IRunnerActions instance) - { - if (m_Wrapper.m_RunnerActionsCallbackInterface != null) - { - @Jump.started -= m_Wrapper.m_RunnerActionsCallbackInterface.OnJump; - @Jump.performed -= m_Wrapper.m_RunnerActionsCallbackInterface.OnJump; - @Jump.canceled -= m_Wrapper.m_RunnerActionsCallbackInterface.OnJump; - } - m_Wrapper.m_RunnerActionsCallbackInterface = instance; - if (instance != null) - { - @Jump.started += instance.OnJump; - @Jump.performed += instance.OnJump; - @Jump.canceled += instance.OnJump; - } - } - } - public RunnerActions @Runner => new RunnerActions(this); - public interface IRunnerActions - { - void OnJump(InputAction.CallbackContext context); - } -} diff --git a/Assets/Scripts/PlayerScripts/PlayerItems/ItemScripts/GamePadControlls.cs.meta b/Assets/Scripts/PlayerScripts/PlayerItems/ItemScripts/GamePadControlls.cs.meta deleted file mode 100644 index 723882b..0000000 --- a/Assets/Scripts/PlayerScripts/PlayerItems/ItemScripts/GamePadControlls.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 3698cf5288c74ad41ba892329e2fb719 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/PlayerScripts/PlayerItems/ItemScripts/GamePadControlls.inputactions b/Assets/Scripts/PlayerScripts/PlayerItems/ItemScripts/GamePadControlls.inputactions deleted file mode 100644 index eb95162..0000000 --- a/Assets/Scripts/PlayerScripts/PlayerItems/ItemScripts/GamePadControlls.inputactions +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "GamePadControlls", - "maps": [ - { - "name": "Runner", - "id": "5b72a223-d8e7-4904-bda9-b7bc5bf92850", - "actions": [ - { - "name": "Jump", - "type": "Button", - "id": "bd111e05-cd62-4634-ac88-eb948971f528", - "expectedControlType": "Button", - "processors": "", - "interactions": "" - } - ], - "bindings": [ - { - "name": "", - "id": "9fde690f-bb27-4b3c-a7e4-4354283ff9da", - "path": "/buttonSouth", - "interactions": "", - "processors": "", - "groups": "", - "action": "Jump", - "isComposite": false, - "isPartOfComposite": false - } - ] - } - ], - "controlSchemes": [] -} \ No newline at end of file diff --git a/Assets/Scripts/PlayerScripts/PlayerItems/ItemScripts/GamePadControlls.inputactions.meta b/Assets/Scripts/PlayerScripts/PlayerItems/ItemScripts/GamePadControlls.inputactions.meta deleted file mode 100644 index e2844b9..0000000 --- a/Assets/Scripts/PlayerScripts/PlayerItems/ItemScripts/GamePadControlls.inputactions.meta +++ /dev/null @@ -1,14 +0,0 @@ -fileFormatVersion: 2 -guid: c3d6a5f3edd2f9d4693efbb2085dde9c -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 8404be70184654265930450def6a9037, type: 3} - generateWrapperCode: 1 - wrapperCodePath: - wrapperClassName: - wrapperCodeNamespace: diff --git a/Assets/Scripts/PlayerScripts/PlayerItems/ItemScripts/GrapplingHook.cs b/Assets/Scripts/PlayerScripts/PlayerItems/ItemScripts/GrapplingHook.cs index 74f7a7e..f8302e8 100644 --- a/Assets/Scripts/PlayerScripts/PlayerItems/ItemScripts/GrapplingHook.cs +++ b/Assets/Scripts/PlayerScripts/PlayerItems/ItemScripts/GrapplingHook.cs @@ -34,7 +34,7 @@ public class GrapplingHook : NetworkBehaviour { //if (!IsLocalPlayer) { return; } - if (Input.GetKeyDown(KeyCode.E)) //If grapple button is hit + if (Input.GetKeyDown(KeyCode.E) || Input.GetKeyDown(KeyCode.JoystickButton2)) //If grapple button is hit { if (!isGrappled) //If we are not grappling { @@ -59,8 +59,8 @@ public class GrapplingHook : NetworkBehaviour if (isGrappled) { Debug.DrawRay(gameObject.transform.position, (hookPoint.transform.position - gameObject.transform.position)); //Visual of line - - if (Input.GetKey(KeyCode.LeftShift)) //Extend hook + + if (Input.GetKey(KeyCode.LeftShift) || Input.GetKey(KeyCode.JoystickButton4)) //Extend hook { ropeLength += climbRate * Time.deltaTime; if (ropeLength > maxGrappleDistance) @@ -69,7 +69,7 @@ public class GrapplingHook : NetworkBehaviour } //Debug.Log(ropeLength.ToString()); } - if (Input.GetKey(KeyCode.RightShift)) // Retract Hook + if (Input.GetKey(KeyCode.RightShift) || Input.GetKey(KeyCode.JoystickButton5)) // Retract Hook { ropeLength -= climbRate * Time.deltaTime; if (ropeLength < 5) diff --git a/Assets/Scripts/PlayerScripts/PlayerItems/ItemScripts/Nitro.cs b/Assets/Scripts/PlayerScripts/PlayerItems/ItemScripts/Nitro.cs index e89c2c4..52c6866 100644 --- a/Assets/Scripts/PlayerScripts/PlayerItems/ItemScripts/Nitro.cs +++ b/Assets/Scripts/PlayerScripts/PlayerItems/ItemScripts/Nitro.cs @@ -11,26 +11,27 @@ public class Nitro : MonoBehaviour private float coolDown; // Start is called before the first frame update - void Start(){ + void Start() + { playerStats = GetComponent(); - coolDown = 5.0f; - //retrieves - driver = FindObjectOfType(); } - //// Update is called once per frame - //void Update(){ - // //once cooldowns are implemented, put this on one (a long one) - // if (Input.GetKeyDown(KeyCode.LeftShift) && isOnCoolDown == false){ - // playerStats.CurVel = playerStats.MaxVel; - // StartCoroutine(startCoolDown()); - // } - //} - //private IEnumerator startCoolDown(){ - // Debug.Log("start corotine"); - // isOnCoolDown = true; + // Update is called once per frame + void Update() + { + //once cooldowns are implemented, put this on one (a long one) + if (Input.GetKeyDown(KeyCode.LeftShift) && isOnCoolDown == false) + { + playerStats.CurVel = playerStats.MaxVel; + StartCoroutine(startCoolDown()); + } + } + + private IEnumerator startCoolDown(){ + Debug.Log("start corotine"); + isOnCoolDown = true; // driver.startUICooldown("Nitro"); - // yield return new WaitForSeconds(coolDown); - // isOnCoolDown = false; - //} + yield return new WaitForSeconds(coolDown); + isOnCoolDown = false; + } } diff --git a/Assets/Scripts/PlayerScripts/PlayerMovement.cs b/Assets/Scripts/PlayerScripts/PlayerMovement.cs index d2ebab2..03189ee 100644 --- a/Assets/Scripts/PlayerScripts/PlayerMovement.cs +++ b/Assets/Scripts/PlayerScripts/PlayerMovement.cs @@ -3,12 +3,10 @@ using System.Collections.Generic; using MLAPI; using UnityEngine; using UnityEngine.UI; -using UnityEngine.InputSystem; public class PlayerMovement : NetworkBehaviour { //Controller object - new GamePadControlls controler; //Scripts public PlayerStats pStats; @@ -90,8 +88,8 @@ public class PlayerMovement : NetworkBehaviour capCol = GetComponent(); pStats = GetComponent(); parentObj = transform.parent.gameObject; - controler = new GamePadControlls(); - controler.Runner.Enable(); + + capCol.enabled = false; //Wallrun @@ -299,13 +297,30 @@ public class PlayerMovement : NetworkBehaviour Vector3 lastCamPos = new Vector3(0,0,0); Vector3 rotOffset = transform.localEulerAngles; if(moveController.enabled){ - transform.parent.Rotate(Vector3.up * sensitivity * Time.deltaTime * Input.GetAxis("Mouse X")); + + //if input is received from Mouse X + if (Input.GetAxis("Mouse X") != 0){ + transform.parent.Rotate(Vector3.up * sensitivity * Time.deltaTime * Input.GetAxis("Mouse X")); + } + //if input is received from right analog stick (horizontal) + else if(Input.GetAxis("HorizontalCam") != 0){ + transform.parent.Rotate(Vector3.up * sensitivity * Time.deltaTime * Input.GetAxis("HorizontalCam")); + } - camRotation.x -= Input.GetAxis("Mouse Y") * sensitivity * Time.deltaTime; - camRotation.x = Mathf.Clamp(camRotation.x, minAngle, maxAngle); - - cam.transform.localEulerAngles = camRotation; + //if input is if input is received from Mouse Y + if (Input.GetAxis("Mouse Y") != 0) + { + camRotation.x -= Input.GetAxis("Mouse Y") * sensitivity * Time.deltaTime; + camRotation.x = Mathf.Clamp(camRotation.x, minAngle, maxAngle); + cam.transform.localEulerAngles = camRotation; + } + //if input is received from right analog stick (vertical) + else if (Input.GetAxis("VerticalTurn") != 0){ + camRotation.x -= Input.GetAxis("VerticalTurn") * sensitivity * Time.deltaTime; + camRotation.x = Mathf.Clamp(camRotation.x, minAngle, maxAngle); + cam.transform.localEulerAngles = camRotation; + } } } @@ -425,7 +440,7 @@ public class PlayerMovement : NetworkBehaviour //Slide Function private void Slide(){ - if (Input.GetKey(KeyCode.Q)){ + if (Input.GetKey(KeyCode.JoystickButton1) || Input.GetKey(KeyCode.Q)){ qDown = true; if (isSliding == false){ originalTraction = pStats.Traction; diff --git a/Packages/manifest.json b/Packages/manifest.json index fd2093c..58a1dea 100644 --- a/Packages/manifest.json +++ b/Packages/manifest.json @@ -5,7 +5,6 @@ "com.unity.ide.rider": "2.0.7", "com.unity.ide.visualstudio": "2.0.12", "com.unity.ide.vscode": "1.2.4", - "com.unity.inputsystem": "1.0.2", "com.unity.multiplayer.mlapi": "https://github.com/Unity-Technologies/com.unity.multiplayer.mlapi.git?path=/com.unity.multiplayer.mlapi#release/0.1.0", "com.unity.test-framework": "1.1.29", "com.unity.textmeshpro": "3.0.6", diff --git a/Packages/packages-lock.json b/Packages/packages-lock.json index 75fa372..a6da21a 100644 --- a/Packages/packages-lock.json +++ b/Packages/packages-lock.json @@ -45,13 +45,6 @@ "dependencies": {}, "url": "https://packages.unity.com" }, - "com.unity.inputsystem": { - "version": "1.0.2", - "depth": 0, - "source": "registry", - "dependencies": {}, - "url": "https://packages.unity.com" - }, "com.unity.multiplayer.mlapi": { "version": "https://github.com/Unity-Technologies/com.unity.multiplayer.mlapi.git?path=/com.unity.multiplayer.mlapi#release/0.1.0", "depth": 0, diff --git a/ProjectSettings/EditorBuildSettings.asset b/ProjectSettings/EditorBuildSettings.asset index cc38895..31c5a85 100644 --- a/ProjectSettings/EditorBuildSettings.asset +++ b/ProjectSettings/EditorBuildSettings.asset @@ -20,4 +20,5 @@ EditorBuildSettings: - enabled: 1 path: Assets/Scenes/PostGame.unity guid: f4ce64377389f094f87c07cfa7f940f4 - m_configObjects: {} + m_configObjects: + com.unity.input.settings: {fileID: 11400000, guid: 0882d22490679254ba3fa693a71a80e0, type: 2} diff --git a/ProjectSettings/InputManager.asset b/ProjectSettings/InputManager.asset index b1f7c2b..ecc64f9 100644 --- a/ProjectSettings/InputManager.asset +++ b/ProjectSettings/InputManager.asset @@ -167,7 +167,7 @@ InputManager: joyNum: 0 - serializedVersion: 3 m_Name: Vertical - descriptiveName: + descriptiveName: GamePad Vertical Left Stick descriptiveNegativeName: negativeButton: positiveButton: @@ -234,7 +234,7 @@ InputManager: descriptiveName: descriptiveNegativeName: negativeButton: - positiveButton: joystick button 3 + positiveButton: joystick button 0 altNegativeButton: altPositiveButton: gravity: 1000 @@ -246,19 +246,19 @@ InputManager: axis: 0 joyNum: 0 - serializedVersion: 3 - m_Name: Submit - descriptiveName: + m_Name: Horizontal + descriptiveName: GamePad Horizontal Left Stick descriptiveNegativeName: negativeButton: - positiveButton: return + positiveButton: altNegativeButton: - altPositiveButton: joystick button 0 - gravity: 1000 - dead: 0.001 - sensitivity: 1000 + altPositiveButton: + gravity: 0 + dead: 0.19 + sensitivity: 1 snap: 0 invert: 0 - type: 0 + type: 2 axis: 0 joyNum: 0 - serializedVersion: 3 @@ -293,3 +293,67 @@ InputManager: type: 0 axis: 0 joyNum: 0 + - serializedVersion: 3 + m_Name: HorizontalCam + descriptiveName: GamePad horizontal right stick + descriptiveNegativeName: + negativeButton: + positiveButton: + altNegativeButton: + altPositiveButton: + gravity: 0 + dead: 0.19 + sensitivity: 1 + snap: 0 + invert: 0 + type: 2 + axis: 3 + joyNum: 0 + - serializedVersion: 3 + m_Name: VerticalTurn + descriptiveName: GamePad vertical right stick + descriptiveNegativeName: + negativeButton: + positiveButton: + altNegativeButton: + altPositiveButton: + gravity: 0 + dead: 0.19 + sensitivity: 1 + snap: 0 + invert: 1 + type: 2 + axis: 4 + joyNum: 0 + - serializedVersion: 3 + m_Name: Kick + descriptiveName: GamePad Kick + descriptiveNegativeName: + negativeButton: + positiveButton: + altNegativeButton: + altPositiveButton: + gravity: 0 + dead: 0.2 + sensitivity: 1 + snap: 0 + invert: 0 + type: 2 + axis: 9 + joyNum: 0 + - serializedVersion: 3 + m_Name: Grapple + descriptiveName: GamePad Grapple Left Trigger + descriptiveNegativeName: + negativeButton: + positiveButton: + altNegativeButton: + altPositiveButton: + gravity: 0 + dead: 0.2 + sensitivity: 1 + snap: 0 + invert: 0 + type: 2 + axis: 8 + joyNum: 0 diff --git a/UserSettings/EditorUserSettings.asset b/UserSettings/EditorUserSettings.asset index bd0c832..f476c18 100644 --- a/UserSettings/EditorUserSettings.asset +++ b/UserSettings/EditorUserSettings.asset @@ -6,34 +6,34 @@ EditorUserSettings: serializedVersion: 4 m_ConfigSettings: RecentlyUsedScenePath-0: - value: 224247031146466f181a033019225303593b17282e3169032e2c1336f1af073be7e933d6ca3f31297717e1351027 + value: 224247031146467c0c03096f3d2c4a1e02161124623d28393930 flags: 0 RecentlyUsedScenePath-1: value: 22424703114646680e0b0227036c6f02131b172b282d347e38271427fb flags: 0 RecentlyUsedScenePath-2: - value: 22424703114646680e0b0227036c7b151b180b6505263035233d1221fbd33134e7e422e0e8347129370bfb25 + value: 22424703114646680e0b0227036c7b151b180b650d262f3d192c0e27d1e33136e7a923e7ee2e26 flags: 0 RecentlyUsedScenePath-3: - value: 224247031146467c0c03096f3d2c4a1e02161124623d28393930 + value: 22424703114646680e0b0227036c7b151b180b6501273035202c1327d1e33136e7a923e7ee2e26 flags: 0 RecentlyUsedScenePath-4: - value: 22424703114646680e0b0227036c7b151b180b650d262f3d192c0e27d1e33136e7a923e7ee2e26 + value: 22424703114646680e0b0227036c7b151b180b6519016b0515163936efef2776f7e93ffdfe flags: 0 RecentlyUsedScenePath-5: - value: 22424703114646680e0b0227036c7b151b180b650d262f3d192c0e27d1e33136e7a923e7ee2e26 + value: 22424703114646680e0b0227036c731f1415016439262f2434 flags: 0 RecentlyUsedScenePath-6: - value: 22424703114646680e0b0227036c6f02131b172b282d347e38271427fb + value: 22424703114646680e0b0227036c731f1415016439262f2434 flags: 0 RecentlyUsedScenePath-7: value: 22424703114646680e0b0227036c78111b125507233d28242c20137df7ee3d2cfb flags: 0 RecentlyUsedScenePath-8: - value: 22424703114646680e0b0227036c731f1415016439262f2434 + value: 22424703114646680e0b0227036c7b151b180b652b3a27292f260573f1e33136e7a923e7ee2e26 flags: 0 RecentlyUsedScenePath-9: - value: 22424703114646680e0b0227036c7b151b180b650721283704240d7df7ee3d2cfb + value: 22424703114646680e0b0227036c7b151b180b652b3a27292f260573f1e33136e7a923e7ee2e26 flags: 0 UnityRemoteCompression: value: 337f73