using Code.Infrastructure.Camera.CameraStates; using UnityEngine; namespace Code.Infrastructure.Camera { public class CameraStateMachineRunner : MonoBehaviour { public CameraStateMachine StateMachine; private void Update() { ((BaseCameraState)StateMachine.CurrentBaseState).Update(); } private void LateUpdate() { ((BaseCameraState)StateMachine.CurrentBaseState).LateUpdate(); } } }