123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- //课程的名字对应的ID
- public struct SubjectData
- {
- public string subject_name;
- public string id;
- }
- //课程的结构
- public struct CourseConfigData
- {
- public string subject_id;
- public string id;
- public string desc;
- public string course_name;
- public string open_audio;//是否开启语音
- public bool isFinish;//只有是已经做完的 才可以显示
- public bool isLock;//锁有锁的进不去 但是看得见
- public int sort_id;//排序优先级
- }
- public class StartConnectData
- {
- public short user_type;//用户类型
- public short school_id;//学校id
- public string user_name;//名字
- //public string device_id;//设备唯一编号
- }
- //房间列表信息
- public class RoomBackData
- {
- public short user_type;//用户类型
- public short school_id;//学校id
- public string user_name;//名字
- }
- public class BrocastClass
- {
- public short mType;//手柄射线是0 老师操作发给学生的 是1 学生
- }
- //位置信息
- public class MoveData
- {
- public Vector3 pos;
- }
- //核心操作信息 这个里面尽量只处理和点击有关的
- public class OperateData
- {
- public short index;//一个根据枚举类型来区别操作的
- public short canshu;//第一个参数
- }
- //选择题的数据传输
- public class SelectData
- {
- public short index;//题目编号
- public short res;//ABCD 选项 -1表示没有选
- public int costTime;//做题时间
- public int timeStamp;
- }
- //游戏得分
- public class ScoreData
- {
- public int score;//得分
- public int costTime;//用时
- }
- public class TimeLineData
- {
- public short data0;//
- public short data1;//
- public short data2;//
- }
- // item列表的点击参数较多 专门做一个类型
- public class ItemClickData
- {
- //public int type;// 点击的Item类型 可以判断是点击了哪一类哪个控件的
- public int firstId;//唯一的id
- public int secondId;//二级id
- public int thirdId;//三级级id
- public int forthId;//四级级id
- public float per;//播放的百分比 timeline 的进度 翻页的页数 电影的时长
- public int index;//Jump 的索引 页数
- public int playType;//播放的状态 TimeLineUIClickType 对应的这个
- public int timeStamp;
- public ItemClickData()
- {
- ResetTime();
- }
- public void ResetTime()
- {
- timeStamp = CStaticMethod.CurTimeStamp();
- }
- }
- //房间的列表信息
- public class SocketRoomItemArrayData
- {
- public short ct;//房间数量
- public SocketOnlineRoomItemData[] datas;
- }
- //老师创建房间时候发送的房间信息
- public class SocketRoomItemData
- {
- public int owner_id;//房主的ID
- public string owner_name;//老师的名字
- public string course_name;//自定义的房间名字
- public short subject_id;//创建的课程类别
- public short course_id;//课程的编号
- public bool is_public;//是否是公开课
- }
- //老师创建房间时候同步的房间信息
- public class SocketOnlineRoomItemData
- {
- public int owner_id;//房主的ID
- public string owner_name;//老师的名字
- public string course_name;//自定义的房间名字
- public short subject_id;//创建的课程类别
- public short course_id;//课程的编号
- public short room_id;//房间号码
- public short onlineCt;//在线人数
- public bool is_public;//是否是公开课
- public string AudioRoomName
- {
- get {
- return "jiaoyu_" + course_name.Replace("\0", "") + "_"+ room_id ;
- }
- }
- }
- //刚登陆时候返回去的默认的或者当前的房间号
- public class CurRoomData
- {
- public short room_id;//房间号码
- }
- public class DeleteRoomData
- {
- public short room_id;//房间号码
- }
- //发送的用户进入或者退出房间的消息
- public class UserEnterData
- {
- public short room_id;//房间号码
- public bool is_enter;// true 表示进入 false表示退出
- }
- //发送的用户进入或者退出房间的消息
- public class UserEnterBackData
- {
- public short user_type;//用户类型
- public string user_name;//学生的名字
- public bool is_enter;// true 表示进入 false表示退出
- }
- public class StudentListBackData
- {
- public short ct;
- public UserData[] data;
- }
- public class UserData
- {
- public int user_id;
- public short user_type;//用户类型
- public string user_name;//用户的名字
- }
- public class UserReport
- {
- //这里不存名字
- public string user_id;
- public string report_id;//题目id
- public int report_type;//题目的类型 0 表示选择题 1表示是走进度的 -1表示是游戏得分
- public float value = -1;//具体的值 -1 表示没有成绩
- public int costTime;//做题时间
- public int timeStamp;//提交答案的时间点
- public enum ReportType
- {
- Default,//默认没有状态
- Slider,//百分比
- Score,//计分游戏
- }
- }
- // 1013
- public class RoomOnlineData
- {
- public short room_id;//房间号码
- public short online_ct;//在线人数
- }
- //切换房主
- public class ChangeOwner
- {
- public int owner_id;//房主的ID
- public short room_id;//房间号码
- //public string owner_name;//老师的名字
- }
- public class RefreshData
- {
- public int pannelType;//当前面板的索引
- public int pageIndex;//当前的页数
- public int timelineMode;//TimeLine 的播放状态 暂停 开始
- public int chapterIndex;// 章节索引
- public int btnIndex;//当前章节Timeline的索引
- public int mrMode;//MR 的开启状态
- }
- public class VoiceChatPacket
- {
- public int Length;
- public int Compression;
- public byte[] Data;
- }
- public class AnswerData
- {
- public short id;//当前答案的id
- public bool isOpen;//打开还是关闭
- }
- public class DrawData
- {
- public int mType;// 开始 结束 正在画
- public float color_r;//颜色值预留
- public float color_b;//颜色值预留
- public float color_g;//颜色值预留
- public float color_a;//颜色值预留
- public float size;//画笔的尺寸
- public Vector3 point;//坐标点
- public Color GetColor()
- {
- return new Color(color_r, color_b, color_g, color_a);
- }
- public void SetColor(Color color)
- {
- color_r = color.a;
- color_b = color.b;
- color_g = color.g;
- color_a = color.a;
- }
- public DrawDataType CurType
- {
- get { return (DrawDataType)mType; }
- }
- public void ChangeType(DrawDataType v)
- {
- mType = (int)v;
- }
- public enum DrawDataType
- {
- Default,//默认没有状态
- Ready,//进入画画模式 监听到再次点击就是画线
- Select,//选择颜色
- Start,//开始画 上一部是Ready
- Pasue,//暂停
- End,//结束
- CleanLast,//撤销上一步
- CleanALL,//撤销所有
- Exit,//退出画画模式
- }
- }
- //房间的语音信息
- public class AudioData
- {
- public string roomName;//房间名字
- public string roomId;//语音的房间号
- public bool isOpen;//语音是否开启
- public string StrInfo()
- {
- return roomName + "_" + roomId;
- }
- }
- public class TestData
- {
- public int testA;
- public string testStr;
- public short testShourt;
- public bool boolTest;
-
- }
- public class MRData
- {
- public string mrName;
- public int test;// 1 开始 2 结束
- public int score;//当前得分
- public int timeStamp;//时间
- }
- public enum MRGameMode
- {
- Enter,// 默认进入
- Refresh,//刷新分数
- Exit,//退出
- }
- public class SocketCoreData
- {
- public short ct;//数据的数量
- public SocketClassData[] classes;
- public System.Object[] datas;
- }
- public class SocketClassData
- {
- public string DataClassName;//参数自定义类名
- }
|