Refactor scene management, Enable wasd movement, Add level menu
This commit is contained in:
33
Assets/Scripts/Components/PlayerInputsCompoment.cs
Normal file
33
Assets/Scripts/Components/PlayerInputsCompoment.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using HurricaneVR.Framework.ControllerInput;
|
||||
using HurricaneVR.Framework.Shared;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class PlayerInputsCompoment : HVRPlayerInputs
|
||||
{
|
||||
protected bool EnableMouseLook;
|
||||
|
||||
protected override void UpdateInput()
|
||||
{
|
||||
base.UpdateInput();
|
||||
|
||||
EnableMouseLook = !Input.GetKey(KeyCode.LeftAlt);
|
||||
}
|
||||
|
||||
protected override Vector2 GetMouse(out bool mouseDown)
|
||||
{
|
||||
mouseDown = EnableMouseLook;
|
||||
return new Vector2(Input.GetAxis("Mouse X"), Input.GetAxis("Mouse Y"));
|
||||
}
|
||||
|
||||
protected override bool GetIsJumpActivated()
|
||||
{
|
||||
if (Input.GetKey(KeyCode.Space))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user