예제 #1
0
    private void Start()
    {
        rb        = GetComponent <Rigidbody>();
        _moveable = GetComponent <Moveable>();

        _currentState.Entry(this, rb, transform, _moveable);
    }
예제 #2
0
    void Update()
    {
        doCursor();

        _newState = _currentState.input();

        if (_newState == null)
        {
            _currentState.update();
        }
        else
        {
            _currentState = _newState;
            _currentState.Entry(this, rb, transform, _moveable);
        }
    }