Compare commits

...

2 Commits

16 changed files with 2925 additions and 6643 deletions

View File

@ -505,8 +505,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 133, y: 0} m_AnchoredPosition: {x: 131.21, y: 0}
m_SizeDelta: {x: 264.61078, y: 133.33334} m_SizeDelta: {x: 874.73486, y: 133.33334}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &5439774741587608355 --- !u!222 &5439774741587608355
CanvasRenderer: CanvasRenderer:

View File

@ -12,7 +12,6 @@ GameObject:
- component: {fileID: 709970142} - component: {fileID: 709970142}
- component: {fileID: 709970141} - component: {fileID: 709970141}
- component: {fileID: 709970140} - component: {fileID: 709970140}
- component: {fileID: 126338308}
m_Layer: 5 m_Layer: 5
m_Name: Back_bton m_Name: Back_bton
m_TagString: Untagged m_TagString: Untagged
@ -119,20 +118,6 @@ MonoBehaviour:
m_OnClick: m_OnClick:
m_PersistentCalls: m_PersistentCalls:
m_Calls: [] m_Calls: []
--- !u!114 &126338308
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 709970138}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5af19e703120cb44f8f33c68274e60c2, type: 3}
m_Name:
m_EditorClassIdentifier:
shihuo: {fileID: 0}
gandiao: {fileID: 709970140}
--- !u!1 &760769433 --- !u!1 &760769433
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

File diff suppressed because it is too large Load Diff

View File

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 2867c644cac2f7b488d4acbc11bd2ea4
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -8,7 +8,7 @@ using UnityEngine.UI;
using XFrame.Core.UI; using XFrame.Core.UI;
public class Login_panl : MonoBehaviour public class Login_panl : MonoBehaviour
{ {
string url = "http://172.16.1.254:48888";//wed端的地址 string url = "http://111.229.30.246:48888";//wed端的地址
[SerializeField]//外界的类拿不到信息 [SerializeField]//外界的类拿不到信息
public UserInfo user = new UserInfo(); public UserInfo user = new UserInfo();
@ -18,7 +18,6 @@ public class Login_panl : MonoBehaviour
public Text tips_txt;//提示文本 public Text tips_txt;//提示文本
public GameObject main_panl;//激活主页面 public GameObject main_panl;//激活主页面
public RectTransform login_panl;//失活主页面 public RectTransform login_panl;//失活主页面
public RectTransform Main_page;//背景界面失活
void Start() void Start()
{ {
@ -37,7 +36,6 @@ public class Login_panl : MonoBehaviour
{ {
login_panl.gameObject.SetActive(false); login_panl.gameObject.SetActive(false);
main_panl.gameObject.SetActive(true); main_panl.gameObject.SetActive(true);
Main_page.gameObject.SetActive(false);
GameMain.tiao = true; GameMain.tiao = true;
} }
} }
@ -45,11 +43,11 @@ public class Login_panl : MonoBehaviour
private void Login() private void Login()
{ {
login_panl.gameObject.SetActive(false); //login_panl.gameObject.SetActive(false);
main_panl.gameObject.SetActive(true); //main_panl.gameObject.SetActive(true);
Main_page.gameObject.SetActive(false); //Main_page.gameObject.SetActive(false);
@ -60,6 +58,7 @@ public class Login_panl : MonoBehaviour
} }
else else
{ {
string account = username_input.text; string account = username_input.text;
string password = password_input.text; string password = password_input.text;
string url = this.url + "/Handler/User.ashx?action=login"; string url = this.url + "/Handler/User.ashx?action=login";
@ -82,6 +81,7 @@ public class Login_panl : MonoBehaviour
//string userdate = jd["data"].ToString(); //string userdate = jd["data"].ToString();
//UserInfo user = new UserInfo(); //UserInfo user = new UserInfo();
user = rot.data; user = rot.data;
GlobalFlag.currentUser = user;
//user.user_id = jd["data"]["user_id"].ToString(); //user.user_id = jd["data"]["user_id"].ToString();
//user.login_name = jd["data"]["login_name"].ToString(); //user.login_name = jd["data"]["login_name"].ToString();
//user.real_name = jd["data"]["real_name"].ToString(); //user.real_name = jd["data"]["real_name"].ToString();
@ -91,7 +91,6 @@ public class Login_panl : MonoBehaviour
PlayerPrefs.SetString("user_id", user.user_id); PlayerPrefs.SetString("user_id", user.user_id);
login_panl.gameObject.SetActive(false); login_panl.gameObject.SetActive(false);
main_panl.gameObject.SetActive(true); main_panl.gameObject.SetActive(true);
Main_page.gameObject.SetActive(false);
} }
else else
{ {

View File

@ -19,6 +19,11 @@ public class Main_interface_Panel : XUIPanel
{ {
replay = this.transform.Find("UPBG/double_quotation_btn").GetComponent<Button>(); replay = this.transform.Find("UPBG/double_quotation_btn").GetComponent<Button>();
train = this.transform.Find("UPBG/training_task_btn").GetComponent<Button>(); train = this.transform.Find("UPBG/training_task_btn").GetComponent<Button>();
fanhui_btn = this.transform.Find("UPBG/Back_bton").GetComponent<Button>();
fanhui_btn.onClick.AddListener(() =>
{
});
ShowPanel<View_Panel2>(); ShowPanel<View_Panel2>();
this.transform.Find("UPBG/Back_bton").GetComponent<Button>().onClick.AddListener(() => this.transform.Find("UPBG/Back_bton").GetComponent<Button>().onClick.AddListener(() =>
{ {

View File

@ -4,6 +4,7 @@ using System.Collections.Generic;
using UnityEngine; using UnityEngine;
public class Managementtxt { } public class Managementtxt { }
#region//登入注册接口数据类 #region//登入注册接口数据类
[Serializable]
public class UserInfo public class UserInfo
{ {
/// <summary> /// <summary>
@ -28,6 +29,7 @@ public class UserInfo
public string role_name ; public string role_name ;
} }
[Serializable]
public class LoginRoot public class LoginRoot
{ {
/// <summary> /// <summary>

View File

@ -25,8 +25,8 @@ public class RoomInfo
public class View_Panel2 : XUIPanel public class View_Panel2 : XUIPanel
{ {
public Button training_task_btn;//训练任务按钮 public Button training_task_btn;//训练任务按钮
public Button append_btn;//添加按钮
public Button scenario_btn;//想定编辑
public Image append_room_panl;//添加房间页面 public Image append_room_panl;//添加房间页面
public InputField room_input;//输入房间名字 public InputField room_input;//输入房间名字
public Button Fork_off_btn;//叉掉添加房间页面 public Button Fork_off_btn;//叉掉添加房间页面
@ -41,10 +41,9 @@ public class View_Panel2 : XUIPanel
public Button tijiao_btn;//提交按钮 public Button tijiao_btn;//提交按钮
public Button quxiao_btn;//取消按钮 public Button quxiao_btn;//取消按钮
public Image Storm_and_capture_panl;//红方蓝方 public GameObject Storm_and_capture_panl;//红方蓝方
public Button Cancel4_btn;//红蓝方叉掉页面 public Button Cancel4_btn;//红蓝方叉掉页面
public Button start_training_btn;//开始训练按钮
public Button entering_key_btn;//进入导调按钮
public Transform place;//需要生成地方 public Transform place;//需要生成地方
public GameObject root_pan;//需要生成房间预设体 public GameObject root_pan;//需要生成房间预设体
public List<Text> roomnamelist = new List<Text>();//创建房间的名字 public List<Text> roomnamelist = new List<Text>();//创建房间的名字
@ -73,6 +72,23 @@ public class View_Panel2 : XUIPanel
public GameObject currentRoomSubjectItem; public GameObject currentRoomSubjectItem;
public Transform currentRoomSubjectItemConnect; public Transform currentRoomSubjectItemConnect;
public Dictionary<int, string> currentThinkingIds = new Dictionary<int, string>(); public Dictionary<int, string> currentThinkingIds = new Dictionary<int, string>();
public List<CurrentEditorAccount> currentEditorAccounts = new List<CurrentEditorAccount>();
public string currentSubjectID;
public string currentSeatID;
public string currentAccount;
public Text currentAccountText;
public Transform greenSubjectInfoParent;
public Transform redSubjectInfoParent;
public GameObject redSubjectInfoItem;
public GameObject greenSubjectInfoItem;
public GameObject submitView;
public Button svSubmitBtn;
public Button svCancelBtn;
public Text submitInstruct;
public Button append_btn;//添加房间按钮
public Button start_training_btn;//开始训练按钮
public Button entering_key_btn;//进入导调按钮
public Button scenario_btn;//想定编辑
public View_Panel2() : base(UIType.Normal, UIMode.HideOther, UICollider.Normal) public View_Panel2() : base(UIType.Normal, UIMode.HideOther, UICollider.Normal)
{ {
uiPath = "UIPanel/View_Panel2"; uiPath = "UIPanel/View_Panel2";
@ -95,19 +111,37 @@ public class View_Panel2 : XUIPanel
off3_btn = GameObject.Find("View_Panel2(Clone)").transform.GetChild(4).transform.GetChild(1).GetComponent<Button>(); off3_btn = GameObject.Find("View_Panel2(Clone)").transform.GetChild(4).transform.GetChild(1).GetComponent<Button>();
place = GameObject.Find("View_Panel2(Clone)").transform.GetChild(1).transform.GetChild(0).transform.GetChild(0).GetComponent<Transform>(); place = GameObject.Find("View_Panel2(Clone)").transform.GetChild(1).transform.GetChild(0).transform.GetChild(0).GetComponent<Transform>();
tijiao_btn = GameObject.Find("View_Panel2(Clone)").transform.GetChild(4).transform.GetChild(8).GetComponent<Button>();
quxiao_btn = GameObject.Find("View_Panel2(Clone)").transform.GetChild(4).transform.GetChild(9).GetComponent<Button>(); Storm_and_capture_panl = this.transform.Find("Storm_and_capture_panl").gameObject;
Storm_and_capture_panl = GameObject.Find("View_Panel2(Clone)").transform.GetChild(5).GetComponent<Image>(); submitView = Storm_and_capture_panl.transform.Find("SubmitView").gameObject;
submitInstruct = submitView.transform.Find("Bg/Instruct").GetComponent<Text>();
svSubmitBtn = submitView.transform.Find("SubmitBtn").GetComponent<Button>();
svCancelBtn = submitView.transform.Find("CancelBtn").GetComponent<Button>();
start_training_btn = Storm_and_capture_panl.transform.Find("Bottom/start_training_btn").GetComponent<Button>();
entering_key_btn = Storm_and_capture_panl.transform.Find("Bottom/entering_key_btn").GetComponent<Button>();
svCancelBtn.onClick.AddListener(() =>
{
svSubmitBtn.onClick.RemoveAllListeners();
submitInstruct.text = "请确认是否选择当前席位";
submitView.SetActive(false);
});
submitView.SetActive(false);
Cancel4_btn = GameObject.Find("View_Panel2(Clone)").transform.GetChild(5).transform.GetChild(1).GetComponent<Button>(); Cancel4_btn = GameObject.Find("View_Panel2(Clone)").transform.GetChild(5).transform.GetChild(1).GetComponent<Button>();
start_training_btn = GameObject.Find("View_Panel2(Clone)").transform.GetChild(5).transform.GetChild(6).GetComponent<Button>();
entering_key_btn = GameObject.Find("View_Panel2(Clone)").transform.GetChild(5).transform.GetChild(7).GetComponent<Button>();
root_pan = Resources.Load<GameObject>("UIPanel/generate_panl"); root_pan = Resources.Load<GameObject>("UIPanel/generate_panl");
this.transform.Find("UPBG/Refresh_btn").GetComponent<Button>().onClick.AddListener(() => this.transform.Find("UPBG/Refresh_btn").GetComponent<Button>().onClick.AddListener(() =>
{ {
GetAllRoomData(); GetAllRoomData();
}); });
tijiao_btn = GameObject.Find("View_Panel2(Clone)").transform.GetChild(4).transform.GetChild(8).GetComponent<Button>();
quxiao_btn = GameObject.Find("View_Panel2(Clone)").transform.GetChild(4).transform.GetChild(9).GetComponent<Button>();
currentRoomSubjectItemConnect = Storm_and_capture_panl.transform.Find("Campsite_iamg/Subjects").GetComponent<ScrollRect>().content; currentRoomSubjectItemConnect = Storm_and_capture_panl.transform.Find("Campsite_iamg/Subjects").GetComponent<ScrollRect>().content;
redSubjectInfoParent = Storm_and_capture_panl.transform.Find("red_panl/Seat").GetComponent<ScrollRect>().content;
greenSubjectInfoParent = Storm_and_capture_panl.transform.Find("green_panl/Seat").GetComponent<ScrollRect>().content;
redSubjectInfoItem = redSubjectInfoParent.GetChild(0).gameObject;
greenSubjectInfoItem = greenSubjectInfoParent.GetChild(0).gameObject;
redSubjectInfoItem.SetActive(false);
greenSubjectInfoItem.SetActive(false);
currentRoomSubjectItem = currentRoomSubjectItemConnect.GetChild(0).gameObject; currentRoomSubjectItem = currentRoomSubjectItemConnect.GetChild(0).gameObject;
currentRoomSubjectItem.SetActive(false); currentRoomSubjectItem.SetActive(false);
submit_btn = distribution_panl.transform.Find("submit_btn").GetComponent<Button>(); submit_btn = distribution_panl.transform.Find("submit_btn").GetComponent<Button>();
@ -119,12 +153,22 @@ public class View_Panel2 : XUIPanel
jobInputField = selector_panl.transform.Find("JobInputField").GetComponent<InputField>(); jobInputField = selector_panl.transform.Find("JobInputField").GetComponent<InputField>();
userItem = userConent.GetChild(0).gameObject; userItem = userConent.GetChild(0).gameObject;
thinkingDropdown.options.Clear(); thinkingDropdown.options.Clear();
tijiao_btn.onClick.AddListener(() =>
{
if (!string.IsNullOrEmpty(currentAccount))
{
currentAccountText.text = currentAccount;
TiJiaoBtn();
}
});
for (int i = 0; i < UIBootstrap.Instance.traininginformations.Count; i++) for (int i = 0; i < UIBootstrap.Instance.traininginformations.Count; i++)
{ {
int index = i; int index = i;
Dropdown.OptionData data = new Dropdown.OptionData(); Dropdown.OptionData data = new Dropdown.OptionData();
data.text = UIBootstrap.Instance.traininginformations[index].Name; data.text = UIBootstrap.Instance.traininginformations[index].Name;
currentThinkingIds.Add(index, UIBootstrap.Instance.traininginformations[index].Id); if (!currentThinkingIds.ContainsKey(index))
currentThinkingIds.Add(index, UIBootstrap.Instance.traininginformations[index].Id);
thinkingDropdown.options.Add(data); thinkingDropdown.options.Add(data);
} }
thinkingDropdown.onValueChanged.AddListener((index) => thinkingDropdown.onValueChanged.AddListener((index) =>
@ -133,10 +177,13 @@ public class View_Panel2 : XUIPanel
currentThinkingId = currentThinkingIds[index]; currentThinkingId = currentThinkingIds[index];
CreateSubject(); CreateSubject();
}); });
roomModelDropdown.onValueChanged.AddListener(OnRoomModelDropdown); roomModelDropdown.onValueChanged.AddListener((index) =>
currentMissionModel = roomModelDropdown.options[0].text; {
currentMissionModel = roomModelDropdown.options[index].text;
});
this.transform.Find("UPBG/append_btn").GetComponent<Button>().onClick.AddListener(() => append_btn = this.transform.Find("UPBG/append_btn").GetComponent<Button>();
append_btn.onClick.AddListener(() =>
{ {
append_room_panl.gameObject.SetActive(true); append_room_panl.gameObject.SetActive(true);
}); });
@ -166,8 +213,35 @@ public class View_Panel2 : XUIPanel
GetAllUserData(); GetAllUserData();
subjectItem.SetActive(false); subjectItem.SetActive(false);
userItem.SetActive(false); userItem.SetActive(false);
currentThinkName = thinkingDropdown.options[0].text; thinkingDropdown.onValueChanged.Invoke(0);
roomModelDropdown.onValueChanged.Invoke(0);
CreateSubject(); CreateSubject();
Debug.Log(GlobalFlag.currentUser.role_code);
switch (GlobalFlag.currentUser.role_code)
{
//超级管理员 00
//一般管理员 01
//导调人员 02
//教师 03
//学员 04
case "00":
break;
case "01":
break;
case "02":
start_training_btn.gameObject.SetActive(false);
break;
case "03":
start_training_btn.gameObject.SetActive(false);
break;
case "04":
case "05":
entering_key_btn.gameObject.SetActive(false);
append_btn.interactable = false;
scenario_btn.interactable = false;
break;
}
} }
public async void GetAllRoomData() public async void GetAllRoomData()
@ -187,7 +261,7 @@ public class View_Panel2 : XUIPanel
{ {
userData = await AsyncWebReq.Post<UserData>(userUrl, null); userData = await AsyncWebReq.Post<UserData>(userUrl, null);
} }
public List<GameObject> currentAllAccount = new List<GameObject>();
public void CreateAllUser(List<DataItem> userInfo) public void CreateAllUser(List<DataItem> userInfo)
{ {
if (userConent.childCount > 1) if (userConent.childCount > 1)
@ -196,17 +270,91 @@ public class View_Panel2 : XUIPanel
{ {
GameObject.Destroy(userConent.GetChild(i).gameObject); GameObject.Destroy(userConent.GetChild(i).gameObject);
} }
currentAllAccount.Clear();
} }
for (int i = 0; i < userInfo.Count; i++) for (int i = 0; i < userInfo.Count; i++)
{ {
int index = i;
GameObject obj = GameObject.Instantiate(userItem, userConent); GameObject obj = GameObject.Instantiate(userItem, userConent);
obj.SetActive(true); obj.SetActive(true);
obj.transform.GetChild(0).GetComponent<Text>().text = userData.data[i].login_name; obj.name = userData.data[index].login_name + "," + currentSubjectID;
obj.transform.GetChild(1).GetComponent<Text>().text = userData.data[i].job_number; obj.transform.GetChild(0).GetComponent<Text>().text = userData.data[index].login_name;
obj.transform.GetChild(1).GetComponent<Text>().text = userData.data[index].job_number;
userConent.GetComponent<ToggleGroup>().allowSwitchOff = true;
obj.transform.GetChild(2).GetComponent<Toggle>().group = userConent.GetComponent<ToggleGroup>(); obj.transform.GetChild(2).GetComponent<Toggle>().group = userConent.GetComponent<ToggleGroup>();
obj.transform.GetChild(2).GetComponent<Toggle>().isOn = false;
obj.transform.GetChild(2).GetComponent<Toggle>().onValueChanged.AddListener((isOn) =>
{
if (isOn)
{
currentAccount = userData.data[index].login_name;
}
else
{
currentAccount = "";
}
Debug.Log($"currentAccount{currentAccount}");
});
currentAllAccount.Add(obj);
} }
} }
public void EliminateAccount()
{
if (currentEditorAccounts.Count > 0 && currentAllAccount.Count > 0)
{
for (int i = 0; i < currentEditorAccounts.Count; i++)
{
for (int j = 0; j < currentAllAccount.Count; j++)
{
if (currentAllAccount[j].name.Contains(currentEditorAccounts[i].account) && currentAllAccount[j].name.Contains(currentEditorAccounts[i].subjectID))
{
GameObject.Destroy(currentAllAccount[j]);
}
}
}
}
}
/// <summary>
/// 席位分配提交按钮
/// </summary>
public void TiJiaoBtn()
{
CurrentEditorAccount ced = new CurrentEditorAccount();
if (currentEditorAccounts.Count > 0)
{
for (int i = 0; i < currentEditorAccounts.Count; i++)
{
int index = i;
if (currentEditorAccounts[index].subjectID.Equals(currentSubjectID) && currentEditorAccounts[index].SeatID.Equals(currentSeatID))
{
currentEditorAccounts[index].account = currentAccount;
selector_panl.gameObject.SetActive(false);
}
else
{
ced.subjectID = currentSubjectID;
ced.SeatID = currentSeatID;
ced.account = currentAccount;
if (!currentEditorAccounts.Contains(ced))
currentEditorAccounts.Add(ced);
}
}
}
else
{
ced.subjectID = currentSubjectID;
ced.SeatID = currentSeatID;
ced.account = currentAccount;
if (!currentEditorAccounts.Contains(ced))
currentEditorAccounts.Add(ced);
}
selector_panl.gameObject.SetActive(false);
Debug.Log(currentEditorAccounts.Count);
}
/// <summary> /// <summary>
/// 创建 新建房间的科目 /// 创建 新建房间的科目
/// </summary> /// </summary>
@ -227,6 +375,7 @@ public class View_Panel2 : XUIPanel
{ {
GameObject subjectTemp = GameObject.Instantiate(subjectItem, subjectContent); GameObject subjectTemp = GameObject.Instantiate(subjectItem, subjectContent);
subjectTemp.SetActive(true); subjectTemp.SetActive(true);
subjectTemp.name = UIBootstrap.Instance.traininginformations[i].subjectsInfo[j].subjectId;
subjectTemp.transform.Find("Text").GetComponent<Text>().text = UIBootstrap.Instance.traininginformations[i].subjectsInfo[j].subjectName; subjectTemp.transform.Find("Text").GetComponent<Text>().text = UIBootstrap.Instance.traininginformations[i].subjectsInfo[j].subjectName;
subjectTemp.transform.Find("Text").GetComponent<Text>().enabled = true; subjectTemp.transform.Find("Text").GetComponent<Text>().enabled = true;
if (UIBootstrap.Instance.traininginformations[i].subjectsInfo[j].TrainDestList.Count < 2) if (UIBootstrap.Instance.traininginformations[i].subjectsInfo[j].TrainDestList.Count < 2)
@ -256,27 +405,11 @@ public class View_Panel2 : XUIPanel
///0 红方 1 蓝方 ///0 红方 1 蓝方
if (UIBootstrap.Instance.traininginformations[i].subjectsInfo[j].seatInfos[k].role.Equals("0")) if (UIBootstrap.Instance.traininginformations[i].subjectsInfo[j].seatInfos[k].role.Equals("0"))
{ {
GameObject obj = GameObject.Instantiate(revealPrefab, redParent); CreateSeatInfo(i, j, k, redParent, subjectTemp.name);
obj.transform.GetChild(0).GetComponent<Text>().text = Spilt(UIBootstrap.Instance.traininginformations[i].subjectsInfo[j].seatInfos[k].seatName, 0, 2);
obj.transform.GetChild(1).GetComponent<Text>().text = Spilt(UIBootstrap.Instance.traininginformations[i].subjectsInfo[j].seatInfos[k].seatName, 2, 2);
obj.transform.GetChild(2).GetComponent<Text>().text = UIBootstrap.Instance.traininginformations[i].subjectsInfo[j].seatInfos[k].seatno;
obj.transform.GetChild(3).GetComponent<Button>().onClick.AddListener(() =>
{
selector_panl.gameObject.SetActive(true);
CreateAllUser(userData.data);
});
} }
else else
{ {
GameObject obj = GameObject.Instantiate(revealPrefab, greenParent); CreateSeatInfo(i, j, k, greenParent, subjectTemp.name);
obj.transform.GetChild(0).GetComponent<Text>().text = Spilt(UIBootstrap.Instance.traininginformations[i].subjectsInfo[j].seatInfos[k].seatName, 0, 1);
obj.transform.GetChild(1).GetComponent<Text>().text = Spilt(UIBootstrap.Instance.traininginformations[i].subjectsInfo[j].seatInfos[k].seatName, 2, 2);
obj.transform.GetChild(2).GetComponent<Text>().text = UIBootstrap.Instance.traininginformations[i].subjectsInfo[j].seatInfos[k].seatno;
obj.transform.GetChild(3).GetComponent<Button>().onClick.AddListener(() =>
{
selector_panl.gameObject.SetActive(true);
CreateAllUser(userData.data);
});
} }
} }
} }
@ -285,6 +418,37 @@ public class View_Panel2 : XUIPanel
} }
} }
} }
/// <summary>
/// 新建房间 想定编辑里的科目信息
/// </summary>
/// <param name="indexI"></param>
/// <param name="indexJ"></param>
/// <param name="indexK"></param>
/// <param name="parent"></param>
/// <param name="subjectName"></param>
private void CreateSeatInfo(int indexI, int indexJ, int indexK, Transform parent, string subjectName)
{
GameObject seatTemp = GameObject.Instantiate(revealPrefab, parent);
seatTemp.name = UIBootstrap.Instance.traininginformations[indexI].subjectsInfo[indexJ].seatInfos[indexK].seatId;
seatTemp.transform.GetChild(0).GetComponent<Text>().text = Spilt(UIBootstrap.Instance.traininginformations[indexI].subjectsInfo[indexJ].seatInfos[indexK].seatName, 0, 1);
seatTemp.transform.GetChild(1).GetComponent<Text>().text = Spilt(UIBootstrap.Instance.traininginformations[indexI].subjectsInfo[indexJ].seatInfos[indexK].seatName, 2, 2);
//obj.transform.GetChild(2).GetComponent<Text>().text = UIBootstrap.Instance.traininginformations[i].subjectsInfo[j].seatInfos[k].seatno;
seatTemp.transform.GetChild(3).GetComponent<Button>().onClick.AddListener(() =>
{
currentSubjectID = subjectName;
currentSeatID = seatTemp.name;
currentAccountText = seatTemp.transform.GetChild(2).GetComponent<Text>();
GetAllUserData();
selector_panl.gameObject.SetActive(true);
CreateAllUser(userData.data);
EliminateAccount();
Debug.Log($"currentSubjectID+currentSeatID=" + currentSubjectID + "=" + currentSeatID);
});
if (GlobalFlag.currentUser.role_code.Equals("04") || GlobalFlag.currentUser.role_code.Equals("05"))
{
seatTemp.transform.GetChild(3).GetComponent<Button>().interactable = false;
}
}
public string Spilt(string data, int startIndex, int endIndex) public string Spilt(string data, int startIndex, int endIndex)
{ {
@ -336,7 +500,7 @@ public class View_Panel2 : XUIPanel
} }
} }
public RDate.DataItem currentRoomData = new RDate.DataItem(); public RSData.RoomSubjectData currentRoomData = new RSData.RoomSubjectData();
public void CreateRoomBase(string roomId, string name) public void CreateRoomBase(string roomId, string name)
{ {
@ -346,25 +510,19 @@ public class View_Panel2 : XUIPanel
roomItem.transform.Find("view_btn").GetComponent<Button>().onClick.AddListener(async () => roomItem.transform.Find("view_btn").GetComponent<Button>().onClick.AddListener(async () =>
{ {
Storm_and_capture_panl.gameObject.SetActive(true); Storm_and_capture_panl.gameObject.SetActive(true);
//currentRoomData = await AsyncWebReq.Get<RDate.DataItem>("http://111.229.30.246:48888/Handler/Practice.ashx?action=queryone&Id=" + roomItem.name); currentRoomData = await AsyncWebReq.Get<RSData.RoomSubjectData>("http://111.229.30.246:48888/Handler/Practice.ashx?action=querypracticesubject&PracticeId=" + roomItem.name);
for (int i = 0; i < roomdata.data.Count; i++) Debug.Log(currentRoomData.data.Count + "==" + roomItem.name);
{ CreateSubjectItem(currentRoomData.data);
if (roomItem.name.Equals(roomdata.data[i].Id))
{
currentRoomData = roomdata.data[i];
}
}
Debug.Log(currentRoomData.Id + "====" + roomItem.name);
Traininginformation tt = new Traininginformation();
tt = Jsonanalyze.FromJson<Traininginformation>(currentRoomData.ThinkingData);
CreateSubjectItem(tt);
}); });
} }
public RSData.SubjectInfo currentSubjectInfo = new RSData.SubjectInfo();
public string currentDIPracticeID;
public string currentDISubjectID;
/// <summary> /// <summary>
/// 创建查看房间的科目 /// 创建查看房间的科目
/// </summary> /// </summary>
/// <param name="t"></param> /// <param name="t"></param>
public void CreateSubjectItem(Traininginformation t) public void CreateSubjectItem(List<RSData.DataItem> di)
{ {
if (currentRoomSubjectItemConnect.childCount > 1) if (currentRoomSubjectItemConnect.childCount > 1)
{ {
@ -373,19 +531,173 @@ public class View_Panel2 : XUIPanel
GameObject.Destroy(currentRoomSubjectItemConnect.GetChild(i).gameObject); GameObject.Destroy(currentRoomSubjectItemConnect.GetChild(i).gameObject);
} }
} }
for (int i = 0; i < t.subjectsInfo.Count; i++) DestorySubjectSeatInfo();
for (int i = 0; i < di.Count; i++)
{ {
int index = i; int index = i;
GameObject subjectTemp = GameObject.Instantiate(currentRoomSubjectItem, currentRoomSubjectItemConnect); GameObject subjectTemp = GameObject.Instantiate(currentRoomSubjectItem, currentRoomSubjectItemConnect);
subjectTemp.name = t.subjectsInfo[index].subjectId;
subjectTemp.transform.GetChild(0).GetComponent<Text>().text = t.subjectsInfo[index].subjectName;
subjectTemp.SetActive(true); subjectTemp.SetActive(true);
subjectTemp.GetComponent<Button>().onClick.AddListener(() => subjectTemp.name = di[index].Id;
subjectTemp.transform.GetChild(0).GetComponent<Text>().text = di[index].Name;
subjectTemp.GetComponent<Button>().onClick.AddListener(async () =>
{ {
Debug.Log(" subjectTemp.name ===" + subjectTemp.name); currentDIPracticeID = di[index].PracticeId;
currentDISubjectID = subjectTemp.name;
currentSubjectInfo = await AsyncWebReq.Get<RSData.SubjectInfo>("http://111.229.30.246:48888/Handler/Practice.ashx?action=querypracticeseat&PracticeId=" + currentDIPracticeID + "&PracticeSubjectId=" + currentDISubjectID);
CreateSubjectInfo(currentSubjectInfo.data);
}); });
} }
currentRoomSubjectItemConnect.GetChild(1).GetComponent<Button>().onClick.Invoke();
} }
/// <summary>
/// 删除科目席位信息
/// </summary>
public void DestorySubjectSeatInfo()
{
if (redSubjectInfoParent.childCount > 1)
{
for (int i = 1; i < redSubjectInfoParent.childCount; i++)
{
GameObject.Destroy(redSubjectInfoParent.GetChild(i).gameObject);
}
}
if (greenSubjectInfoParent.childCount > 1)
{
for (int i = 1; i < greenSubjectInfoParent.childCount; i++)
{
GameObject.Destroy(greenSubjectInfoParent.GetChild(i).gameObject);
}
}
}
/// <summary>
/// 创建科目席位信息
/// </summary>
/// <param name="sdi"></param>
public void CreateSubjectInfo(List<RSData.SubjectDataItem> sdi)
{
DestorySubjectSeatInfo();
List<Toggle> allToggles = new List<Toggle>();
bool isAssigned = false;
///0 红方 1 蓝方
for (int i = 0; i < sdi.Count; i++)
{
int index = i;
if (sdi[i].Role.Equals("0"))
{
GameObject item = GameObject.Instantiate(redSubjectInfoItem, redSubjectInfoParent);
item.SetActive(true);
item.name = sdi[index].Id;
item.transform.GetChild(0).GetComponent<Text>().text = sdi[index].SeatName.Substring(0, 2);
item.transform.GetChild(1).GetComponent<Text>().text = sdi[index].SeatName.Substring(2, 2);
item.transform.GetChild(2).GetComponent<Toggle>().isOn = false;
item.transform.GetChild(2).GetComponent<Toggle>().group.SetAllTogglesOff();
if (sdi[index].UserAccount != "999")
{
item.transform.GetChild(2).GetComponent<Toggle>().isOn = true;
item.transform.GetChild(2).GetComponent<Toggle>().interactable = false;
item.transform.GetChild(2).GetComponent<Toggle>().enabled = false;
if (sdi[index].UserAccount == GlobalFlag.currentUser.login_name)
{
item.transform.GetChild(2).GetComponent<Toggle>().graphic.color = Color.green;
isAssigned = true;
}
}
else
{
}
item.transform.GetChild(2).GetComponent<Toggle>().onValueChanged.AddListener((isOn) =>
{
if (isOn)
{
if (sdi[index].UserAccount != GlobalFlag.currentUser.login_name)
{
submitView.SetActive(true);
svSubmitBtn.interactable = true;
svSubmitBtn.onClick.AddListener(() =>
{
OnEditorSeatInfo(item.name, GlobalFlag.currentUser.login_name);
svSubmitBtn.interactable = false;
});
}
}
});
allToggles.Add(item.transform.GetChild(2).GetComponent<Toggle>());
}
if (sdi[index].Role.Equals("1"))
{
GameObject item = GameObject.Instantiate(greenSubjectInfoItem, greenSubjectInfoParent);
item.SetActive(true);
item.name = sdi[index].Id;
item.transform.GetChild(0).GetComponent<Text>().text = sdi[index].SeatName.Substring(0, 2);
item.transform.GetChild(1).GetComponent<Text>().text = sdi[index].SeatName.Substring(2, 2);
item.transform.GetChild(2).GetComponent<Toggle>().isOn = false;
item.transform.GetChild(2).GetComponent<Toggle>().group.SetAllTogglesOff();
if (sdi[index].UserAccount != "999")
{
item.transform.GetChild(2).GetComponent<Toggle>().isOn = true;
item.transform.GetChild(2).GetComponent<Toggle>().interactable = false;
item.transform.GetChild(2).GetComponent<Toggle>().enabled = false;
if (sdi[index].UserAccount == GlobalFlag.currentUser.login_name)
{
item.transform.GetChild(2).GetComponent<Toggle>().graphic.color = Color.green;
isAssigned = true;
}
}
else
{
}
item.transform.GetChild(2).GetComponent<Toggle>().onValueChanged.AddListener((isOn) =>
{
if (isOn)
{
if (sdi[index].UserAccount != GlobalFlag.currentUser.login_name)
{
submitView.SetActive(true);
svSubmitBtn.interactable = true;
svSubmitBtn.onClick.AddListener(() =>
{
OnEditorSeatInfo(item.name, GlobalFlag.currentUser.login_name);
svSubmitBtn.interactable = false;
});
}
}
});
allToggles.Add(item.transform.GetChild(2).GetComponent<Toggle>());
}
}
if (isAssigned)
{
if (allToggles.Count > 0)
{
for (int i = 0; i < allToggles.Count; i++)
{
allToggles[i].enabled = false;
}
}
}
}
public async void OnEditorSeatInfo(string practiceSeatId, string accout)
{
PData.UpdatePracticeSeatData upsd = new PData.UpdatePracticeSeatData();
upsd = await AsyncWebReq.Post<PData.UpdatePracticeSeatData>("http://111.229.30.246:48888/Handler/PracticeSeat.ashx?action=UpdatePracticeSeatOne&practiceseatId=" + practiceSeatId + "&Account=" + accout, null);
if (upsd.state)
{
submitInstruct.text = "提交成功";
}
else
{
submitInstruct.text = "提交失败,席位已经被占用";
}
currentSubjectInfo = await AsyncWebReq.Get<RSData.SubjectInfo>("http://111.229.30.246:48888/Handler/Practice.ashx?action=querypracticeseat&PracticeId=" + currentDIPracticeID + "&PracticeSubjectId=" + currentDISubjectID);
CreateSubjectInfo(currentSubjectInfo.data);
}
/// <summary> /// <summary>
/// 分配面板提交按钮和取消人员选择按钮 /// 分配面板提交按钮和取消人员选择按钮
@ -397,8 +709,8 @@ public class View_Panel2 : XUIPanel
append_room_panl.gameObject.SetActive(false); append_room_panl.gameObject.SetActive(false);
distribution_panl.gameObject.SetActive(false); distribution_panl.gameObject.SetActive(false);
selector_panl.gameObject.SetActive(false); selector_panl.gameObject.SetActive(false);
string accountInfo = AccountsInfo();
ReturnRoomID returnRoomId = await AsyncWebReq.Post<ReturnRoomID>("http://111.229.30.246:48888/Handler/Practice.ashx?action=add&Name=" + currentRoomName + "&MissionModel=" + currentMissionModel + "&ThinkingId=" + currentThinkingId, null); ReturnRoomID returnRoomId = await AsyncWebReq.Post<ReturnRoomID>("http://111.229.30.246:48888/Handler/Practice.ashx?action=add&Name=" + currentRoomName + "&MissionModel=" + currentMissionModel + "&ThinkingId=" + currentThinkingId + "&AccountsInfo=" + accountInfo, null);
if (returnRoomId.state) if (returnRoomId.state)
{ {
CreateRoomBase(returnRoomId.data, currentRoomName); CreateRoomBase(returnRoomId.data, currentRoomName);
@ -416,6 +728,18 @@ public class View_Panel2 : XUIPanel
}); });
} }
public string AccountsInfo()
{
string info = "";
for (int i = 0; i < currentEditorAccounts.Count; i++)
{
string ss = currentEditorAccounts[i].subjectID + "," + currentEditorAccounts[i].SeatID + "," + currentEditorAccounts[i].account + ";";
info += ss;
}
return info;
}
/// <summary> /// <summary>
/// 添加分配面板和取消 /// 添加分配面板和取消
/// </summary> /// </summary>
@ -440,14 +764,7 @@ public class View_Panel2 : XUIPanel
}); });
} }
public void OnRoomModelDropdown(int index)
{
currentMissionModel = roomModelDropdown.options[index].text;
}
public void OnTinkingDropdown(int index)
{
currentThinkingId = thinkingDropdown.options[index].text;
}
/// <summary> /// <summary>
/// 叉掉房间按钮 /// 叉掉房间按钮
@ -487,3 +804,10 @@ public class View_Panel2 : XUIPanel
} }
} }
public class CurrentEditorAccount
{
public string subjectID;
public string SeatID;
public string account;
}

View File

@ -304,80 +304,6 @@ RectTransform:
type: 3} type: 3}
m_PrefabInstance: {fileID: 87242910} m_PrefabInstance: {fileID: 87242910}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
--- !u!1 &211396687
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 211396688}
- component: {fileID: 211396690}
- component: {fileID: 211396689}
m_Layer: 5
m_Name: Panel
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &211396688
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 211396687}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 884735634}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: -1}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &211396689
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 211396687}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_Maskable: 0
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: fe1e5a8eab1cd1d47bd277226e522c72, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!222 &211396690
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 211396687}
m_CullTransparentMesh: 0
--- !u!1 &231695981 --- !u!1 &231695981
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -467,6 +393,10 @@ PrefabInstance:
propertyPath: shihuo propertyPath: shihuo
value: value:
objectReference: {fileID: 561772550} objectReference: {fileID: 561772550}
- target: {fileID: 126338308, guid: c57206d8b4c25124a855fec64c26cd1e, type: 3}
propertyPath: m_Enabled
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3263964912047736458, guid: c57206d8b4c25124a855fec64c26cd1e, - target: {fileID: 3263964912047736458, guid: c57206d8b4c25124a855fec64c26cd1e,
type: 3} type: 3}
propertyPath: m_Name propertyPath: m_Name
@ -582,7 +512,8 @@ PrefabInstance:
propertyPath: m_Pivot.y propertyPath: m_Pivot.y
value: 0.5 value: 0.5
objectReference: {fileID: 0} objectReference: {fileID: 0}
m_RemovedComponents: [] m_RemovedComponents:
- {fileID: 126338308, guid: c57206d8b4c25124a855fec64c26cd1e, type: 3}
m_SourcePrefab: {fileID: 100100000, guid: c57206d8b4c25124a855fec64c26cd1e, type: 3} m_SourcePrefab: {fileID: 100100000, guid: c57206d8b4c25124a855fec64c26cd1e, type: 3}
--- !u!1 &283434452 --- !u!1 &283434452
GameObject: GameObject:
@ -1519,7 +1450,6 @@ RectTransform:
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0, y: 0, z: 0} m_LocalScale: {x: 0, y: 0, z: 0}
m_Children: m_Children:
- {fileID: 211396688}
- {fileID: 1240925094} - {fileID: 1240925094}
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 5 m_RootOrder: 5
@ -1541,13 +1471,18 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 339f933d8c88b0d4dabef83d571e5d2f, type: 3} m_Script: {fileID: 11500000, guid: 339f933d8c88b0d4dabef83d571e5d2f, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
user:
user_id:
login_name:
real_name:
role_code:
role_name:
username_input: {fileID: 835460217} username_input: {fileID: 835460217}
password_input: {fileID: 514598457} password_input: {fileID: 514598457}
login_btn: {fileID: 1601136678} login_btn: {fileID: 1601136678}
tips_txt: {fileID: 1126413266} tips_txt: {fileID: 1126413266}
main_panl: {fileID: 561772550} main_panl: {fileID: 561772550}
login_panl: {fileID: 1240925094} login_panl: {fileID: 1240925094}
Main_page: {fileID: 211396688}
--- !u!1 &963194225 --- !u!1 &963194225
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -1991,6 +1926,8 @@ GameObject:
serializedVersion: 6 serializedVersion: 6
m_Component: m_Component:
- component: {fileID: 1240925094} - component: {fileID: 1240925094}
- component: {fileID: 1240925096}
- component: {fileID: 1240925095}
m_Layer: 5 m_Layer: 5
m_Name: login_panl m_Name: login_panl
m_TagString: Untagged m_TagString: Untagged
@ -2018,13 +1955,50 @@ RectTransform:
- {fileID: 305941371} - {fileID: 305941371}
- {fileID: 371022983} - {fileID: 371022983}
m_Father: {fileID: 884735634} m_Father: {fileID: 884735634}
m_RootOrder: 1 m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1} m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1240925095
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1240925093}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_Maskable: 0
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: fe1e5a8eab1cd1d47bd277226e522c72, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!222 &1240925096
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1240925093}
m_CullTransparentMesh: 0
--- !u!1 &1275324135 --- !u!1 &1275324135
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -3079,7 +3053,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1} m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 250, y: -190} m_AnchoredPosition: {x: 301, y: -194}
m_SizeDelta: {x: 400, y: 300} m_SizeDelta: {x: 400, y: 300}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!1001 &4190038652210028901 --- !u!1001 &4190038652210028901

View File

@ -0,0 +1,25 @@

using System;
namespace PData
{
/// <summary>
/// 更新席位信息的数据结构
/// </summary>
[Serializable]
public class UpdatePracticeSeatData
{
/// <summary>
///
/// </summary>
public bool state;
/// <summary>
///
/// </summary>
public string message;
/// <summary>
///
/// </summary>
public string data;
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 2bbbc08ab14a5fc41975991a42fb3e74
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -162,4 +162,21 @@ namespace RDate
/// </summary> /// </summary>
public List<DataItem> data ; public List<DataItem> data ;
} }
[Serializable]
public class SingleRoomData
{
/// <summary>
///
/// </summary>
public string state;
/// <summary>
///
/// </summary>
public string message;
/// <summary>
///
/// </summary>
public DataItem data;
}
} }

View File

@ -0,0 +1,232 @@

using System;
using System.Collections.Generic;
namespace RSData
{
[Serializable]
public class DataItem
{
/// <summary>
///
/// </summary>
public string Id;
/// <summary>
///
/// </summary>
public string PracticeId;
/// <summary>
///
/// </summary>
public string SubjectId;
/// <summary>
/// 1023-1红蓝对抗
/// </summary>
public string Name;
/// <summary>
///
/// </summary>
public string Tittle;
/// <summary>
/// 红蓝对抗
/// </summary>
public string OperateModel;
/// <summary>
///
/// </summary>
public string Introduce;
/// <summary>
///
/// </summary>
public string UseDevices;
/// <summary>
///
/// </summary>
public string UseSeats;
/// <summary>
///
/// </summary>
public string OperateProcess;
/// <summary>
///
/// </summary>
public string Memo;
/// <summary>
///
/// </summary>
public int State;
/// <summary>
///
/// </summary>
public string UpdateTime;
/// <summary>
///
/// </summary>
public string IsDeleted;
/// <summary>
/// 丘陵
/// </summary>
public string Earth;
/// <summary>
///
/// </summary>
public int SubTime;
/// <summary>
///
/// </summary>
public int OrderIndex;
/// <summary>
///
/// </summary>
public string Field_Decimal1;
/// <summary>
///
/// </summary>
public string Field_Decimal2;
/// <summary>
///
/// </summary>
public string Field_Decimal3;
/// <summary>
///
/// </summary>
public string Field_Char1;
/// <summary>
///
/// </summary>
public string Field_Char2;
/// <summary>
///
/// </summary>
public string Field_Char3;
/// <summary>
///
/// </summary>
public string StartTime;
/// <summary>
///
/// </summary>
public string EndTime;
/// <summary>
///
/// </summary>
public int HardLevel;
}
[Serializable]
public class RoomSubjectData
{
/// <summary>
///
/// </summary>
public string state;
/// <summary>
///
/// </summary>
public string message;
/// <summary>
///
/// </summary>
public List<DataItem> data;
}
[Serializable]
public class SubjectDataItem
{
/// <summary>
///
/// </summary>
public string Id ;
/// <summary>
///
/// </summary>
public string PracticeId ;
/// <summary>
///
/// </summary>
public string PracticeSubjectId ;
/// <summary>
///
/// </summary>
public string SeatId ;
/// <summary>
///
/// </summary>
public string SeatNo ;
/// <summary>
/// 1#士兵
/// </summary>
public string SeatName ;
/// <summary>
/// 虚兵
/// </summary>
public string UserName ;
/// <summary>
///
/// </summary>
public string UserAccount ;
/// <summary>
///
/// </summary>
public string SpecialistAccount ;
/// <summary>
///
/// </summary>
public string Memo ;
/// <summary>
///
/// </summary>
public string UpdateTime ;
/// <summary>
///
/// </summary>
public string IsDeleted ;
/// <summary>
///
/// </summary>
public string DestId ;
/// <summary>
///
/// </summary>
public string Role ;
/// <summary>
///
/// </summary>
public string Field_Decimal1 ;
/// <summary>
///
/// </summary>
public string Field_Decimal2 ;
/// <summary>
///
/// </summary>
public string Field_Decimal3 ;
/// <summary>
///
/// </summary>
public string Field_Char1 ;
/// <summary>
///
/// </summary>
public string Field_Char2 ;
/// <summary>
///
/// </summary>
public string Field_Char3 ;
}
[Serializable]
public class SubjectInfo
{
/// <summary>
///
/// </summary>
public string state ;
/// <summary>
///
/// </summary>
public string message ;
/// <summary>
///
/// </summary>
public List<SubjectDataItem> data ;
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 3c5ae02bbf35d044496840e7d6083fec
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class GlobalFlag
{
public static UserInfo currentUser;
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 3239cdf79cb9a624eb46f71f97def8c9
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: