コード例 #1
0
        public ActionListNode <T> AddAction_Next(GameAction <T> action, ExecuteRule TransRule)
        {
            ActionListNode <T> a = new ActionListNode <T>();

            a._parent       = this;
            action.Executor = Executor;
            a.action        = action;
            if (List.Count == 0)
            {
                if (entered)
                {
                    action.Enter();
                }
                List.AddLast(a);
                rules.AddLast(TransRule);
                currentNode = List.First;
                currentRule = rules.First;
            }
            else
            {
                List.AddAfter(List.First, a);
                rules.AddAfter(rules.First, TransRule);
            }
            return(a);
        }
コード例 #2
0
        public ActionListNode <T> AddAction_End(GameAction <T> action, ExecuteRule TransRule)
        {
            ActionListNode <T> a = new ActionListNode <T>();

            action.Executor = Executor;
            a._parent       = this;
            a.action        = action;
            List.AddLast(a);
            rules.AddLast(TransRule);
            if (currentNode == null)
            {
                if (entered)
                {
                    action.Enter();
                }
                currentNode = List.Last;
                currentRule = rules.Last;
            }

            return(a);
        }