任务相关的变量加入
This commit is contained in:
parent
a69752b3d9
commit
7217b04390
@ -54,6 +54,7 @@ public class TaskItem : MonoBehaviour
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//初始化任务的属性
|
||||||
public void SetInfo(int id,JSONReader js)
|
public void SetInfo(int id,JSONReader js)
|
||||||
{
|
{
|
||||||
taskId = id;
|
taskId = id;
|
||||||
@ -62,15 +63,22 @@ public class TaskItem : MonoBehaviour
|
|||||||
UpdateTxt();
|
UpdateTxt();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//更新Text
|
||||||
void UpdateTxt()
|
void UpdateTxt()
|
||||||
{
|
{
|
||||||
|
|
||||||
Task_ info = jr.GetTaskByID(taskId);
|
Task_ info = jr.GetTaskByID(taskId);
|
||||||
Debug.Log(info);
|
//Debug.Log(info);
|
||||||
tasktxt.text = info.Note;
|
tasktxt.text = info.Note;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 添加触发条件
|
||||||
|
public void AddTrigger(int triggerType, string value)
|
||||||
|
{
|
||||||
|
triggers.Add(triggerType);
|
||||||
|
}
|
||||||
|
|
||||||
// Update is called once per frame
|
// Update is called once per frame
|
||||||
void Update()
|
void Update()
|
||||||
{
|
{
|
||||||
|
@ -15,7 +15,7 @@ public class WEBScriptListener: MonoBehaviour
|
|||||||
//public string serverIP = "ws://192.168.3.110";
|
//public string serverIP = "ws://192.168.3.110";
|
||||||
public string serverIP = "ws://222.212.4.120";
|
public string serverIP = "ws://222.212.4.120";
|
||||||
//服务器端口
|
//服务器端口
|
||||||
public int serverPort =12288;
|
public int serverPort = 2387;
|
||||||
WebSocket socket;
|
WebSocket socket;
|
||||||
public string type; // 类型
|
public string type; // 类型
|
||||||
public delegate void MyCallback(byte[] data);
|
public delegate void MyCallback(byte[] data);
|
||||||
|
@ -18,8 +18,8 @@ public class test : MonoBehaviour
|
|||||||
public string clientId = "e5cd7e4891bf95d1d19206ce24a7b32e";
|
public string clientId = "e5cd7e4891bf95d1d19206ce24a7b32e";
|
||||||
public string grantType = "password";
|
public string grantType = "password";
|
||||||
public string userType = "company_user";
|
public string userType = "company_user";
|
||||||
public string username = "13699802230";
|
public string username = "13006065371";
|
||||||
public string password = "YYL2230!";
|
public string password = "YYL5371!";
|
||||||
}
|
}
|
||||||
//public async void loging()
|
//public async void loging()
|
||||||
//{
|
//{
|
||||||
@ -32,6 +32,7 @@ public class test : MonoBehaviour
|
|||||||
// //Debug.Log(setverData.msg);
|
// //Debug.Log(setverData.msg);
|
||||||
|
|
||||||
//}
|
//}
|
||||||
|
|
||||||
//怬
|
//怬
|
||||||
void lodingWebSocket()
|
void lodingWebSocket()
|
||||||
{
|
{
|
||||||
@ -51,6 +52,8 @@ public class test : MonoBehaviour
|
|||||||
|
|
||||||
wEBScriptListener.SendMessageByte(sendData);
|
wEBScriptListener.SendMessageByte(sendData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//¼ÓÈë·¿¼ä
|
//¼ÓÈë·¿¼ä
|
||||||
void JoinRoom()
|
void JoinRoom()
|
||||||
{
|
{
|
||||||
@ -320,7 +323,7 @@ public class test : MonoBehaviour
|
|||||||
{
|
{
|
||||||
lodingWebSocket();
|
lodingWebSocket();
|
||||||
//JoinRoom();
|
//JoinRoom();
|
||||||
//Heartbeat();
|
Heartbeat();
|
||||||
//BroadcastMessage();
|
//BroadcastMessage();
|
||||||
//UpFps();
|
//UpFps();
|
||||||
//PickUpProp();
|
//PickUpProp();
|
||||||
@ -331,7 +334,7 @@ public class test : MonoBehaviour
|
|||||||
//TaskTrigger();
|
//TaskTrigger();
|
||||||
//TaskUpdateRequest();
|
//TaskUpdateRequest();
|
||||||
}
|
}
|
||||||
int index = 0;
|
//int index = 0;
|
||||||
//while (true)
|
//while (true)
|
||||||
//{
|
//{
|
||||||
// index++;
|
// index++;
|
||||||
|
@ -9,8 +9,6 @@ using System.Threading.Tasks;
|
|||||||
public class TaskPanel : Base
|
public class TaskPanel : Base
|
||||||
{
|
{
|
||||||
|
|
||||||
private List<TaskItem> tasks = new List<TaskItem>();
|
|
||||||
private Dictionary<int, Task> activeTasks = new Dictionary<int, Task>();
|
|
||||||
|
|
||||||
public static TaskPanel instance;
|
public static TaskPanel instance;
|
||||||
|
|
||||||
@ -48,7 +46,10 @@ public class TaskPanel : Base
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//쉥훨蛟으澗폅샀鞫刻
|
||||||
public void OnClickHideButton()
|
public void OnClickHideButton()
|
||||||
{
|
{
|
||||||
// 如果按钮已隐藏,点击后显示
|
// 如果按钮已隐藏,点击后显示
|
||||||
|
@ -20289,7 +20289,7 @@ MonoBehaviour:
|
|||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
serverIP: ws://222.212.4.120
|
serverIP: ws://222.212.4.120
|
||||||
serverPort: 12288
|
serverPort: 2387
|
||||||
type:
|
type:
|
||||||
--- !u!114 &1526740604
|
--- !u!114 &1526740604
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
|
@ -24,7 +24,7 @@ public class FreePanel01 : MonoBehaviour
|
|||||||
{
|
{
|
||||||
timeElapsed = 0f;
|
timeElapsed = 0f;
|
||||||
|
|
||||||
connectBtn.onClick.AddListener(OnClickConnectBtn);
|
//connectBtn.onClick.AddListener(OnClickConnectBtn);//监听点击打电话的按钮
|
||||||
}
|
}
|
||||||
|
|
||||||
//当点击连接通话按钮
|
//当点击连接通话按钮
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 0385375c1818fc57f42407a6c5301a26ded3a19a
|
Subproject commit 2e42b278d4c6ac9e045925dcc6e04896a19cbfd8
|
Loading…
Reference in New Issue
Block a user