/* * Creates a new singleton AISequence from the given Action. * This has no delay after its event. */ public AISequence(AIEvent.Action a) { CheckAllowInstantiation(); this.events = new AIEvent[] { new AIEvent(0f, a) }; this.children = null; this.GetChildren = () => { return(children); }; }
/* * Takes an arbitrary length list of AISequences and combines them into an AISequence. */ public AISequence(params AISequence[] sequences) { CheckAllowInstantiation(); this.events = null; this.children = sequences; this.GetChildren = () => { return(children); }; }
// Used internally as a shortcut. protected AISequence(AIEvent[] events) { CheckAllowInstantiation(); this.events = events; this.children = null; this.GetChildren = () => { return(children); }; }
/* * Keeps track of a function that can "explode" into a single AISequence. * When this is added to the event queue, this function is called. */ public AISequence(GenerateSequence genFunction) { CheckAllowInstantiation(); this.events = null; this.children = null; this.GetChildren = () => new AISequence[] { genFunction() }; this.Description = ShouldTryExpandFunctions ? null : "A sequence was generated from a function."; }