// Update is called once per frame void Update() { var movementCommand = _currentlyActiveControlScheme.MovePlayer(gameObject); var rotateCommand = _currentlyActiveControlScheme.RotatePlayer(gameObject, Camera.main.transform); movementCommand.ExecuteMovement(); rotateCommand.ExecuteRotate(); }
// FixedUpdate is called once per physics frame void FixedUpdate() { _currentlyActiveControlScheme.MovePlayer(gameObject, Camera.main.transform); }