Beispiel #1
0
        private void DisableAll()
        {
            foreach (ICharacterController characterController in _controllers)
            {
                characterController.enabled = false;
            }

            _currentType = CharacterControllerType.End;
        }
Beispiel #2
0
        public void SetCurrentControllerType(CharacterControllerType type)
        {
            if (_currentState != null)
            {
                if (_currentType == type)
                {
                    return;
                }
                _currentState.enabled = false;
            }

            _currentState = _controllers[(int)type];
            _currentState.Init();
            _currentState.enabled = true;
            _currentType          = type;
        }