Beispiel #1
0
    public bool Execute(ICharacter character)
    {
        if (character == null)
        {
            return(false);
        }

        if (m_condition == null)
        {
            return(false);
        }

        ICharacter refCharacter = null;
        bool       ret          = m_condition.Execute(character, ref refCharacter);

        if (!ret)
        {
            return(false);
        }

        if (m_action == null)
        {
            return(false);
        }

        ret = m_action.Execute(character, refCharacter);
        if (!ret)
        {
            return(false);
        }

        return(true);
    }