Controlevents are now working
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user