Beispiel #1
0
 //First build reaction chain
 public void AddReaction(Func<bool> react, Action action)
 {
     ReAction newReAction = new ReAction();
     newReAction.react = react;
     newReAction.action = action;
     reActions.Add(newReAction);
     enabled = true;
 }
Beispiel #2
0
    //First build reaction chain
    public void AddReaction(Func <bool> react, Action action)
    {
        ReAction newReAction = new ReAction();

        newReAction.react  = react;
        newReAction.action = action;
        reActions.Add(newReAction);
        enabled = true;
    }
Beispiel #3
0
    void Next()
    {
        pointer = pointer + 1;

        if (pointer < reActions.Count) {
            currReaction = reActions[pointer];
        }
        else {
            enabled = false;
        }
    }
Beispiel #4
0
    void Next()
    {
        pointer = pointer + 1;

        if (pointer < reActions.Count)
        {
            currReaction = reActions[pointer];
        }
        else
        {
            enabled = false;
        }
    }
Beispiel #5
0
 public void Enable()
 {
     pointer      = 0;
     currReaction = reActions[pointer];
     enabled      = true;
 }
Beispiel #6
0
 public void Enable()
 {
     pointer = 0;
     currReaction = reActions[pointer];
     enabled = true;
 }