Esempio n. 1
0
        // EXECUTE METHOD: ------------------------------------------------------------------------

        public override bool InstantExecute(GameObject target, IAction[] actions, int index)
        {
            ListVariables list = this.listVariables.GetListVariables(target);

            if (list == null)
            {
                return(true);
            }

            switch (this.operation)
            {
            case Operation.VariableToIterator:
                int value = this.pointer.GetInt(target);
                list.SetInterator(value);
                break;

            case Operation.IteratorToVariable:
                this.variable.Set(list.iterator, target);
                break;

            case Operation.IteratorToNext:
                list.NextIterator();
                break;

            case Operation.IteratorToPrevious:
                list.PrevIterator();
                break;
            }

            return(true);
        }
        // EXECUTE METHOD: ------------------------------------------------------------------------

        public override bool InstantExecute(GameObject target, IAction[] actions, int index)
        {
            ListVariables list = this.listVariables.GetListVariables(target);

            if (list == null || list.variables.Count == 0)
            {
                return(true);
            }

            int value = this.pointer.GetInt(target);

            list.SetInterator(value);
            return(true);
        }