private void Start() { rb = GetComponent <Rigidbody>(); _moveable = GetComponent <Moveable>(); _currentState.Entry(this, rb, transform, _moveable); }
void Update() { doCursor(); _newState = _currentState.input(); if (_newState == null) { _currentState.update(); } else { _currentState = _newState; _currentState.Entry(this, rb, transform, _moveable); } }