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; }
public void Init() { _currentState.Init(); }