예제 #1
0
        // 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);
        }
예제 #2
0
        // 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);
        }
예제 #3
0
 public static void ListRemove(ListVariables target, ListVariables.Position position)
 {
     target.Remove(position);
 }
예제 #4
0
 public static void ListRemove(ListVariables target, int index)
 {
     target.Remove(index);
 }