Controlevents are now working

This commit is contained in:
finnchen123
2026-01-25 13:23:03 +01:00
parent 93f02eee13
commit b657de5ea0
7 changed files with 75 additions and 33 deletions

View File

@@ -38,6 +38,14 @@ namespace Assets.Scripts.Player
#if UNITY_EDITOR
SceneHandler.switchGameToMenu();
#endif
ControlEvents.OnLookingInput += rotate;
ControlEvents.OnMovingInput += move;
}
private void OnDisable()
{
ControlEvents.OnLookingInput -= rotate;
ControlEvents.OnMovingInput -= move;
}
void Start()
@@ -179,7 +187,7 @@ namespace Assets.Scripts.Player
GameObject.Find("QuestLog").GetComponent<QuestLog>().updateQuests("explore", gameObject, 1);
}
public void rotate(float yaw){
public void rotate(float pitch, float yaw){
transform.rotation = Quaternion.Euler(0f, yaw, 0f);
}