예제 #1
0
 private void Start()
 {
     pcStateManager = new StateManagerBase <PCState>();
     pcStateManager.RegisterState(new PCIdleState());
     pcStateManager.RegisterState(new PCPlayState());
     pcStateManager.RegisterState(new PCProgressState());
     pcStateManager.RegisterState(new PCBrokenProgressState());
 }
예제 #2
0
        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));
        }