/// <summary> /// 推送Actions,并构建对应的Json类结构 /// </summary> /// <param name="actions"></param> public void PostActions(List <SFAction <ActionType, ParamType> > actions) { var frame = SFFrameJson <ActionType, ParamType> .CreateFrame(actions); frame.FrameID = mgr.CurFrameID + 1; framesFile.Frames.Add(frame); }
/// <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); }
public void PostActions(List <SFAction <ActionType, ParamType> > actions) { var frame = SFFrameJson <ActionType, ParamType> .CreateFrame(actions); frame.FrameID = mgr.CurFrameID + 1; curFrameID = frame.FrameID; //Debug.Log ("PostActions current frame id is " + curFrameID); // SFFrameJson<ActionType, ParamType> frame1 = new SFFrameJson<ActionType, ParamType>(); // frame1.FrameID = 100; // frame1.Duration = 10; // frame1.StartTime = 21; //room.Send<SFFrameJson<ActionType, ParamType> > (frame1, SFUDPSyncMsg.FrameData); // = new SFUDPSyncFrameData<ActionType, ParamType> (); frameDataPoolObj.FrameData = frame; frameDataPoolObj.UID = room.CurUserID; //onResponse = new Subject<int> (); //udpConnor.Send<SFFrameJson<ActionType, ParamType>>(frame); }
public static string ToJson(SFFrameJson <ActionType, ParamType> frame) { return(null); }
public void UpdateFrame(SFFrameJson <ActionType, ParamType> frame) { this.frameData = frame; }