Skip to content
Snippets Groups Projects
Commit 8a12cbec authored by Mamad Farrahi's avatar Mamad Farrahi
Browse files

added jump to the app

parent 6ac05e8b
No related branches found
No related tags found
2 merge requests!2App Base Implementation,!1Dev base remove libraries
......@@ -1008,7 +1008,7 @@ Transform:
- {fileID: 1492008651}
- {fileID: 1040915822}
m_Father: {fileID: 0}
m_RootOrder: 2
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &47041108
PrefabInstance:
......@@ -1500,6 +1500,8 @@ GameObject:
- component: {fileID: 89500992}
- component: {fileID: 89500993}
- component: {fileID: 89500994}
- component: {fileID: 89500995}
- component: {fileID: 89500996}
m_Layer: 0
m_Name: XR Origin
m_TagString: XROriginTag
......@@ -1546,13 +1548,13 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 89500984}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -3.255, y: 7.56, z: -11.344}
m_LocalPosition: {x: -3.255, y: 7.04, z: -11.344}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 1550995443}
m_Father: {fileID: 0}
m_RootOrder: 8
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &89500988
MonoBehaviour:
......@@ -1650,9 +1652,39 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 9ea69bc45997c68439461d75c98c4f25, type: 3}
m_Name:
m_EditorClassIdentifier:
infoLabel: {fileID: 1429900992}
timerLabel: {fileID: 556009408}
timeLeft: 60
isRaceActive: 0
--- !u!114 &89500995
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 89500984}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fc4bbdacca3e76948b0f8ac1c286fee2, type: 3}
m_Name:
m_EditorClassIdentifier:
jumpHeight: 2
forwardForce: 7
timeToNextJump: 0.5
rb: {fileID: 0}
controllerInputManager: {fileID: 89500992}
--- !u!114 &89500996
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 89500984}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ae0e2445c5fbcd0468694e408852563c, type: 3}
m_Name:
m_EditorClassIdentifier:
delayBeforeRestart: 3
--- !u!1001 &89723232
PrefabInstance:
m_ObjectHideFlags: 0
......@@ -1709,107 +1741,6 @@ Transform:
type: 3}
m_PrefabInstance: {fileID: 89723232}
m_PrefabAsset: {fileID: 0}
--- !u!1 &92270082
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 92270083}
- component: {fileID: 92270086}
- component: {fileID: 92270085}
- component: {fileID: 92270084}
m_Layer: 5
m_Name: TimerCanvas
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &92270083
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 92270082}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 20}
m_LocalScale: {x: 0.06, y: 0.06, z: 0.06}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 1429900991}
m_Father: {fileID: 549720497}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: -1.75}
m_SizeDelta: {x: 200, y: 200}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &92270084
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 92270082}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreReversedGraphics: 1
m_BlockingObjects: 0
m_BlockingMask:
serializedVersion: 2
m_Bits: 4294967295
--- !u!114 &92270085
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 92270082}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
m_Name:
m_EditorClassIdentifier:
m_UiScaleMode: 0
m_ReferencePixelsPerUnit: 100
m_ScaleFactor: 1
m_ReferenceResolution: {x: 800, y: 600}
m_ScreenMatchMode: 0
m_MatchWidthOrHeight: 0
m_PhysicalUnit: 3
m_FallbackScreenDPI: 96
m_DefaultSpriteDPI: 96
m_DynamicPixelsPerUnit: 1
m_PresetInfoIsWorld: 1
--- !u!223 &92270086
Canvas:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 92270082}
m_Enabled: 1
serializedVersion: 3
m_RenderMode: 2
m_Camera: {fileID: 0}
m_PlaneDistance: 100
m_PixelPerfect: 0
m_ReceivesEvents: 1
m_OverrideSorting: 0
m_OverridePixelPerfect: 0
m_SortingBucketNormalizedSize: 0
m_AdditionalShaderChannelsFlag: 25
m_SortingLayerID: 0
m_SortingOrder: 0
m_TargetDisplay: 0
--- !u!1001 &98430133
PrefabInstance:
m_ObjectHideFlags: 0
......@@ -3086,7 +3017,7 @@ Transform:
m_Children:
- {fileID: 1479754010}
m_Father: {fileID: 0}
m_RootOrder: 4
m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &152879566
MonoBehaviour:
......@@ -7724,7 +7655,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 92270083}
- {fileID: 1185355161}
- {fileID: 1106108571}
m_Father: {fileID: 1550995443}
m_RootOrder: 0
......@@ -7916,6 +7847,141 @@ Transform:
type: 3}
m_PrefabInstance: {fileID: 553595308}
m_PrefabAsset: {fileID: 0}
--- !u!1 &556009406
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 556009407}
- component: {fileID: 556009409}
- component: {fileID: 556009408}
m_Layer: 5
m_Name: TimerLabel
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &556009407
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 556009406}
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: []
m_Father: {fileID: 1185355161}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -0, y: 24}
m_SizeDelta: {x: 200, y: 50}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &556009408
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 556009406}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: 00:00:00
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4294967295
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 15
m_fontSizeBase: 15
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 1
m_HorizontalAlignment: 1
m_VerticalAlignment: 256
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!222 &556009409
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 556009406}
m_CullTransparentMesh: 1
--- !u!4 &558148445 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 4962039562683002, guid: bbc12ae2f967ec04e8c3c39eeb92733b,
......@@ -9438,7 +9504,7 @@ Transform:
- {fileID: 1106859454}
- {fileID: 1536383540}
m_Father: {fileID: 0}
m_RootOrder: 6
m_RootOrder: 7
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &738322319
PrefabInstance:
......@@ -14031,7 +14097,7 @@ Transform:
m_Children:
- {fileID: 1931489645}
m_Father: {fileID: 0}
m_RootOrder: 1
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &1090363585
PrefabInstance:
......@@ -14961,6 +15027,123 @@ Transform:
type: 3}
m_PrefabInstance: {fileID: 1183276963}
m_PrefabAsset: {fileID: 0}
--- !u!1 &1185355160
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1185355161}
- component: {fileID: 1185355165}
- component: {fileID: 1185355164}
- component: {fileID: 1185355163}
- component: {fileID: 1185355166}
m_Layer: 5
m_Name: Timer Canvas
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1185355161
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1185355160}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 15}
m_LocalScale: {x: 0.06, y: 0.06, z: 0.06}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 556009407}
m_Father: {fileID: 549720497}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 3.78}
m_SizeDelta: {x: 200, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1185355163
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1185355160}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreReversedGraphics: 1
m_BlockingObjects: 0
m_BlockingMask:
serializedVersion: 2
m_Bits: 4294967295
--- !u!114 &1185355164
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1185355160}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
m_Name:
m_EditorClassIdentifier:
m_UiScaleMode: 0
m_ReferencePixelsPerUnit: 100
m_ScaleFactor: 1
m_ReferenceResolution: {x: 800, y: 600}
m_ScreenMatchMode: 0
m_MatchWidthOrHeight: 0
m_PhysicalUnit: 3
m_FallbackScreenDPI: 96
m_DefaultSpriteDPI: 96
m_DynamicPixelsPerUnit: 1
m_PresetInfoIsWorld: 1
--- !u!223 &1185355165
Canvas:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1185355160}
m_Enabled: 1
serializedVersion: 3
m_RenderMode: 2
m_Camera: {fileID: 0}
m_PlaneDistance: 100
m_PixelPerfect: 0
m_ReceivesEvents: 1
m_OverrideSorting: 0
m_OverridePixelPerfect: 0
m_SortingBucketNormalizedSize: 0
m_AdditionalShaderChannelsFlag: 25
m_SortingLayerID: 0
m_SortingOrder: 0
m_TargetDisplay: 0
--- !u!114 &1185355166
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1185355160}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 9ea69bc45997c68439461d75c98c4f25, type: 3}
m_Name:
m_EditorClassIdentifier:
timerLabel: {fileID: 556009408}
timeLeft: 15
isRaceActive: 0
--- !u!1001 &1192585567
PrefabInstance:
m_ObjectHideFlags: 0
......@@ -15994,7 +16177,7 @@ Transform:
m_Children:
- {fileID: 246320987}
m_Father: {fileID: 0}
m_RootOrder: 3
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 127.468, y: -277.751, z: -67.366}
--- !u!1001 &1271067934
PrefabInstance:
......@@ -16295,7 +16478,7 @@ Transform:
m_Children:
- {fileID: 1987993525}
m_Father: {fileID: 0}
m_RootOrder: 5
m_RootOrder: 6
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1278327732
MonoBehaviour:
......@@ -17776,141 +17959,6 @@ Transform:
type: 3}
m_PrefabInstance: {fileID: 1429157497}
m_PrefabAsset: {fileID: 0}
--- !u!1 &1429900990
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1429900991}
- component: {fileID: 1429900993}
- component: {fileID: 1429900992}
m_Layer: 5
m_Name: TimerLabel
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1429900991
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1429900990}
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: []
m_Father: {fileID: 92270083}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -8, y: 139}
m_SizeDelta: {x: 200, y: 50}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1429900992
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1429900990}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: 00:00:00
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4294967295
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 20
m_fontSizeBase: 20
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 0
m_HorizontalAlignment: 1
m_VerticalAlignment: 256
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 26.018879}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!222 &1429900993
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1429900990}
m_CullTransparentMesh: 1
--- !u!1001 &1432379023
PrefabInstance:
m_ObjectHideFlags: 0
......@@ -24485,7 +24533,7 @@ Transform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 7
m_RootOrder: 8
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &1854618551
PrefabInstance:
......@@ -5,7 +5,7 @@ using UnityEngine.UI;
public class GameTimerScript : MonoBehaviour
{
[SerializeField] private TMPro.TextMeshProUGUI infoLabel;
[SerializeField] private TMPro.TextMeshProUGUI timerLabel;
public float timeLeft = 60.0f;
public bool isRaceActive = false;
......@@ -14,7 +14,7 @@ public class GameTimerScript : MonoBehaviour
if (isRaceActive)
{
timeLeft -= Time.deltaTime;
infoLabel.text = "Time Left: " + Mathf.Round(timeLeft).ToString();
timerLabel.text = "Time Left: " + Mathf.Round(timeLeft).ToString();
if (timeLeft <= 0)
{
......
......@@ -3,13 +3,16 @@ using UnityEngine.XR;
public class PlayerJump : MonoBehaviour
{
private bool isJumping = false;
public float jumpForce = 800.0f; // Jump force
public float jumpHeight = 1.0f; // Height to which the player jumps
public float forwardForce = 1.0f; // Forward force
public float jumpHeight = 5.0f; // The vertical jump force
public float forwardForce = 5.0f; // The forward force
public float timeToNextJump = 0.5f; // Time in seconds to wait before the next jump is allowed
public Rigidbody rb;
public ControllerInputManager controllerInputManager; // Reference to your custom controller input manager script
private bool isJumping = false;
private bool buttonWasPressed = false;
private float timeSinceButtonReleased = 0.0f; // Time in seconds since the button was last released
void Start()
{
// Assuming the Rigidbody is attached to the same GameObject as this script.
......@@ -19,49 +22,50 @@ public class PlayerJump : MonoBehaviour
}
}
private bool buttonIsPressed;
void Update()
{
// Check if the secondary button on the right controller is pressed
bool buttonIsPressed;
if (controllerInputManager.rightController.isValid &&
controllerInputManager.rightController.TryGetFeatureValue(CommonUsages.secondaryButton, out buttonIsPressed) &&
buttonIsPressed)
controllerInputManager.rightController.TryGetFeatureValue(CommonUsages.secondaryButton, out buttonIsPressed))
{
// Call the Jump method to make the player jump
if (!isJumping)
// Update the timer if the button is not pressed
if (!buttonIsPressed)
{
timeSinceButtonReleased += Time.deltaTime;
}
// Reset the timer when the button is pressed
if (!buttonIsPressed && buttonWasPressed)
{
isJumping = false;
}
// Only allow a new jump if enough time has passed since the button was last released
if (buttonIsPressed && !isJumping && timeSinceButtonReleased >= timeToNextJump)
{
Jump();
isJumping = true;
timeSinceButtonReleased = 0.0f; // Reset the timer
}
buttonWasPressed = buttonIsPressed;
}
}
void Jump()
{
// Get the forward direction of the camera
Vector3 forwardDir = Camera.main.transform.forward;
// Since isKinematic is true, we move the player manually
Vector3 jumpVector = new Vector3(0, jumpHeight, 0);
// Adding forward movement to the jump
Vector3 forwardVector = forwardDir * forwardForce;
// Combine the two vectors
Vector3 combinedVector = jumpVector + forwardVector;
// Remove any Y-axis component from the forward direction
forwardDir.y = 0;
forwardDir.Normalize();
// Update position
rb.MovePosition(rb.position + combinedVector);
// Mark as currently jumping
isJumping = true;
Vector3 jumpVector = new Vector3(0, jumpHeight, 0);
// Reset after a while (you might want to change this based on your specific game logic)
Invoke("ResetJump", 0.5f);
}
// Combine the jump and forward vectors
Vector3 combinedVector = jumpVector + (forwardDir * forwardForce);
void ResetJump()
{
isJumping = false;
// Apply the combined vector to the Rigidbody's velocity
rb.velocity = combinedVector;
}
}
......@@ -2,8 +2,6 @@ using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine;
public class StartParkourDetection : MonoBehaviour
{
private void OnTriggerEnter(Collider other)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment