/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package transientlibs.tex;
import java.util.ArrayList;
import java.util.Iterator;
import transientlibs.slick2d.util.Log;
import transientlibs.bindedobjects.core.Activator;
import transientlibs.processors.tex.AbstractActivator;
import transientlibs.processors.misc.ClickProcessor;
/**
*
* @author kibertoad
*/
public class ActList extends ArrayList<AbstractActivator> {
public static StringAnalyst genericAnalyst = new StringAnalyst ();
//public String hostID = null; //use it to debug whose actlist it is
public static ActList lastActList;
public void process() {
ClickProcessor nowActivator;
Iterator<AbstractActivator> i = iterator();
while (i.hasNext()) {
nowActivator = i.next();
nowActivator.process();
}
}
public void addBranchDetonator (int toBranch) {
add(new Activator(Activator.branchActivator, toBranch, true));
}
public void addStoryDetonator (int toStory) {
if (toStory == -1) {Log.error("Warning, null story received");}
add(new Activator(Activator.storyActivator, toStory, true));
}
public void addStateTransition (int toState) {
//ActList.lastActList = this;
//Activator.addStateTransition (toState);
add(new Activator(Activator.stateTransitionActivator, toState, true));
}
}