예제 #1
0
    private void Update()
    {
        var newState = _state.Update();

        if (newState != null)
        {
            _state = newState;
        }
    }
예제 #2
0
    private void Update()
    {
        m_currentState.Update(); // Updates the current state

        // Update things that always need to be updated
        if (m_health < 0)
        {
            Destroy();
        }

        transform.LookAt(m_currentTarget.transform);
    }