Beispiel #1
0
        public static SFActionJson <ActionType, ParamType> CreateActionJson(SFAction <ActionType, ParamType> action)
        {
            SFActionJson <ActionType, ParamType> json = new SFActionJson <ActionType, ParamType>();

            json.ActionID = action.ActionID;
            json.FrameID  = action.FrameID;
            json.Param    = action.Param;
            return(json);
        }
Beispiel #2
0
        /// <summary>
        /// 用于快速进行Frame的构造
        /// </summary>
        /// <param name="actions"></param>
        /// <returns></returns>
        public static SFFrameJson <ActionType, ParamType> CreateFrame(List <SFAction <ActionType, ParamType> > actions)
        {
            SFFrameJson <ActionType, ParamType> rets = new SFFrameJson <ActionType, ParamType>();

            foreach (var a in actions)
            {
                rets.Actions.Add(SFActionJson <ActionType, ParamType> .CreateActionJson(a));
            }

            return(rets);
        }