コード例 #1
0
        public static void InsertAction(this PlayMakerFSM fsm, string stateName, FsmStateAction action, int index)
        {
            FsmState t = fsm.GetState(stateName);

            List <FsmStateAction> actions = t.Actions.ToList();

            actions.Insert(index, action);

            t.Actions = actions.ToArray();

            action.Init(t);
        }
コード例 #2
0
ファイル: FsmUtilExt.cs プロジェクト: Ruttie2006/HKMP
        public static void InsertAction(PlayMakerFSM fsm, string stateName, FsmStateAction action, int index)
        {
            foreach (FsmState t in fsm.FsmStates)
            {
                if (t.Name != stateName)
                {
                    continue;
                }
                List <FsmStateAction> actions = t.Actions.ToList();

                actions.Insert(index, action);

                t.Actions = actions.ToArray();

                action.Init(t);
            }
        }
コード例 #3
0
        public static void InsertAction(this FsmState state, int index, FsmStateAction action)
        {
            state.Actions = state.Actions.Insert(index, action).ToArray();

            action.Init(state);
        }