Ejemplo n.º 1
0
        /*
         * 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); };
        }
Ejemplo n.º 2
0
        /*
         * 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); };
        }
Ejemplo n.º 3
0
        // Used internally as a shortcut.
        protected AISequence(AIEvent[] events)
        {
            CheckAllowInstantiation();
            this.events   = events;
            this.children = null;

            this.GetChildren = () => { return(children); };
        }
Ejemplo n.º 4
0
        /*
         * 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.";
        }