Exemplo n.º 1
0
    private ConditionRefPrev ProcessConditionRefPrev(ActorBrain actorBrain, XmlNode node)
    {
        Log("ProcessConditionRefPrev.xml = " + node);

        ConditionRefPrev condition = new ConditionRefPrev(actorBrain);

        int    idxPrev = 1;
        string refPrev = FindChildText(node, "ref");

        if (refPrev != null)
        {
            idxPrev = ToInt(FindChildText(node, "idx"), 1);
        }
        else
        {
            refPrev = GetTextNode(node);
        }

        Log("ProcessConditionRefPrev.refPrev = " + refPrev + " / idxPrev = " + idxPrev);

        condition.SetRefPrev(refPrev);
        condition.SetIdxPrev(idxPrev);

        return(condition);
    }
Exemplo n.º 2
0
    private ConditionRefPrev ProcessConditionRefExists(ActorBrain actorBrain, XmlNode node)
    {
        Log("ProcessConditionRefExists.xml = " + node);

        ConditionRefPrev condition = new ConditionRefPrev(actorBrain);

        int    idxPrev   = 1;
        string refExists = FindChildText(node, "ref");

        if (refExists == null)
        {
            refExists = GetTextNode(node);
        }

        Log("ProcessConditionRefExists.refExists = " + refExists);

        condition.SetRefPrev(refExists);
        condition.SetIdxPrev(0);

        return(condition);
    }