private void Start() { pcStateManager = new StateManagerBase <PCState>(); pcStateManager.RegisterState(new PCIdleState()); pcStateManager.RegisterState(new PCPlayState()); pcStateManager.RegisterState(new PCProgressState()); pcStateManager.RegisterState(new PCBrokenProgressState()); }
private void Awake() { Playerbody = GetComponent <Rigidbody>(); playerCollider = GetComponent <Collider>(); DistanceToGround = playerCollider.bounds.extents.y; Cursor.visible = false; Cursor.lockState = CursorLockMode.Locked; stateManager.RegisterState(new MovementState(this)); stateManager.RegisterState(new UiState(this)); }