diff --git a/Assets/Crossy Road VR/Prefabs/Players/Player Setup.prefab b/Assets/Crossy Road VR/Prefabs/Players/Player Setup.prefab index 2a2a938..007cd69 100644 --- a/Assets/Crossy Road VR/Prefabs/Players/Player Setup.prefab +++ b/Assets/Crossy Road VR/Prefabs/Players/Player Setup.prefab @@ -2424,6 +2424,7 @@ GameObject: - component: {fileID: 6816638489069482198} - component: {fileID: 5964534008193362612} - component: {fileID: 3203601341080865406} + - component: {fileID: 3397185174789479497} m_Layer: 0 m_Name: XR Origin (XR Rig) m_TagString: Player @@ -2616,6 +2617,35 @@ MonoBehaviour: IsRecovering: 0 RecoveryTimer: 0 _IsPreRecovery: 0 +--- !u!114 &3397185174789479497 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7147664097568639172} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 53004812adcae72458f6ee795a7354df, type: 3} + m_Name: + m_EditorClassIdentifier: + _JumpButton: + m_UseReference: 0 + m_Action: + m_Name: Jump Button + m_Type: 0 + m_ExpectedControlType: + m_Id: 3a8ca516-8592-460e-937a-2deba90edab4 + m_Processors: + m_Interactions: + m_SingletonActionBindings: [] + m_Flags: 0 + m_Reference: {fileID: 0} + _JumpHeight: 0 + _CharacterController: {fileID: 0} + _GroundLayers: + serializedVersion: 2 + m_Bits: 0 --- !u!1 &7658757051952670264 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Crossy Road VR/Prefabs/Players/UI.prefab b/Assets/Crossy Road VR/Prefabs/Players/UI.prefab index 4d17409..363cd01 100644 --- a/Assets/Crossy Road VR/Prefabs/Players/UI.prefab +++ b/Assets/Crossy Road VR/Prefabs/Players/UI.prefab @@ -909,7 +909,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} - m_Color: {r: 0.27450982, g: 0.54509807, b: 1, a: 0.392} + m_Color: {r: 0.27450982, g: 0.54509807, b: 1, a: 1} m_RaycastTarget: 1 m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_Maskable: 1 diff --git a/Assets/Crossy Road VR/Scenes/Game/Game Scence.unity b/Assets/Crossy Road VR/Scenes/Game/Game Scence.unity index 94b9cf5..ea57aaa 100644 --- a/Assets/Crossy Road VR/Scenes/Game/Game Scence.unity +++ b/Assets/Crossy Road VR/Scenes/Game/Game Scence.unity @@ -167,7 +167,7 @@ AudioSource: OutputAudioMixerGroup: {fileID: 0} m_audioClip: {fileID: 0} m_PlayOnAwake: 1 - m_Volume: 0.2 + m_Volume: 0.5 m_Pitch: 1 Loop: 1 Mute: 0 diff --git a/Assets/PlayerJumpScript.cs b/Assets/PlayerJumpScript.cs new file mode 100644 index 0000000..c7d1bb1 --- /dev/null +++ b/Assets/PlayerJumpScript.cs @@ -0,0 +1,17 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.InputSystem; + +public class PlayerJumpScript : MonoBehaviour +{ + [SerializeField] private InputActionProperty _JumpButton; + [SerializeField] private float _JumpHeight = 0f; + [SerializeField] private CharacterController _CharacterController; + [SerializeField] private LayerMask _GroundLayers; + + private bool IsGrounded() + { + //return Physics.CheckSphere(transform) + } +} diff --git a/Assets/PlayerJumpScript.cs.meta b/Assets/PlayerJumpScript.cs.meta new file mode 100644 index 0000000..55e674e --- /dev/null +++ b/Assets/PlayerJumpScript.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 53004812adcae72458f6ee795a7354df +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/XRI/Samples/XR Interaction Toolkit/2.6.3/Starter Assets/XRI Default Input Actions.inputactions b/Assets/XRI/Samples/XR Interaction Toolkit/2.6.3/Starter Assets/XRI Default Input Actions.inputactions index e5c13ba..8ab1675 100644 --- a/Assets/XRI/Samples/XR Interaction Toolkit/2.6.3/Starter Assets/XRI Default Input Actions.inputactions +++ b/Assets/XRI/Samples/XR Interaction Toolkit/2.6.3/Starter Assets/XRI Default Input Actions.inputactions @@ -687,7 +687,7 @@ "name": "Select", "type": "Button", "id": "33754c03-48ec-46ef-9bc6-22ed6bfdd8e8", - "expectedControlType": "Button", + "expectedControlType": "", "processors": "", "interactions": "", "initialStateCheck": false @@ -1483,7 +1483,7 @@ "name": "Select", "type": "Button", "id": "ac96c10b-c955-4a46-8e67-bf16bc069b53", - "expectedControlType": "Button", + "expectedControlType": "", "processors": "", "interactions": "", "initialStateCheck": false @@ -1564,7 +1564,7 @@ "name": "Scale Toggle", "type": "Button", "id": "5ad73d15-99a4-4bce-a76f-f49815602416", - "expectedControlType": "Button", + "expectedControlType": "", "processors": "", "interactions": "", "initialStateCheck": false @@ -1577,6 +1577,15 @@ "processors": "", "interactions": "", "initialStateCheck": true + }, + { + "name": "Jump", + "type": "Button", + "id": "6f3ba83b-5a27-4d0c-ab18-c0d8a3bdafdf", + "expectedControlType": "", + "processors": "", + "interactions": "", + "initialStateCheck": false } ], "bindings": [ @@ -1744,6 +1753,17 @@ "action": "Scale Delta", "isComposite": false, "isPartOfComposite": false + }, + { + "name": "", + "id": "a8e593e4-9205-48c8-9286-603e076d5a31", + "path": "{RightHand}/primaryButton", + "interactions": "", + "processors": "", + "groups": ";Generic XR Controller", + "action": "Jump", + "isComposite": false, + "isPartOfComposite": false } ] },