added crosshair, worked on controls, fixed locals

This commit is contained in:
TAASONI3
2024-06-22 18:16:11 +02:00
parent 4d2c52ded5
commit 7b9683bb49
15 changed files with 984 additions and 454 deletions

View File

@@ -20,6 +20,9 @@ public class Controls : MonoBehaviour
PlayerInput playerInput;
MoveDirection direction;
public float mouseSpeed = 10f; //the sensibility
public float controllerSpeed = 1f; //the sensibility
void Start()
{
@@ -51,7 +54,14 @@ public class Controls : MonoBehaviour
{
if (uihandler.canPlayerRotate())
{
playerCam.GetComponent<PlayerCamera>().lookAround(view, playerInput.currentControlScheme == "Controller");
if(playerInput.currentControlScheme == "Controller"){
playerCam.GetComponent<PlayerCamera>().lookAround(view, controllerSpeed);
player.GetComponent<PlayerGameObject>().rotate(view, controllerSpeed);
}
else{
playerCam.GetComponent<PlayerCamera>().lookAround(view, mouseSpeed);
player.GetComponent<PlayerGameObject>().rotate(view, mouseSpeed);
}
}
if (uihandler.canPlayerMove())
{