// 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);
            }

            for (int i = list.variables.Count - 1; i >= 0; --i)
            {
                switch (this.clear)
                {
                case ClearType.ClearAll:
                    list.Remove(i);
                    break;

                case ClearType.ClearEmpty:
                    Variable variable = list.Get(i);
                    if (variable == null || variable.Get().Equals(null))
                    {
                        list.Remove(i);
                    }
                    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);
            }

            list.Remove(this.listVariables.select, this.listVariables.index);
            return(true);
        }
Esempio n. 3
0
 public static void ListRemove(ListVariables target, ListVariables.Position position)
 {
     target.Remove(position);
 }
Esempio n. 4
0
 public static void ListRemove(ListVariables target, int index)
 {
     target.Remove(index);
 }