예제 #1
0
    public void Update()
    {
        if (_currentQuest == null)
        {
            PickAQuest();
        }

        if (_currentCommand == null)
        {
            _currentCommand = _currentQuest.GetCommand(this);
        }

        _currentCommand.invokeOn(this);

        if (_currentCommand.IsCompleted())
        {
            _currentCommand = null;

            if (_currentQuest.IsCompleted())
            {
                _currentQuest.Finalize(this);
                GameLogger.Log(name + " finished quest for " + _currentQuest.GetType().Name);
                _currentQuest = null;
            }
        }

        OnMouseDown();
    }