This commit is contained in:
王志勋 2024-02-04 14:03:09 +08:00
parent 439ea9c48b
commit f796579305
11 changed files with 119 additions and 32 deletions

View File

@ -1 +1 @@
{"ip":"172.16.1.117","port":54232,"userName":"server1234","passwd":"123456"} {"ip":"172.16.1.120","port":54232,"userName":"server1234","passwd":"123456"}

View File

@ -1,10 +1,7 @@
using AdamSync; using AdamSync;
using System.Collections;
using System.Collections.Generic;
using UnityEngine; using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.UI; using UnityEngine.UI;
using static InterfaceManager;
public class Judgmentstate : MonoBehaviour public class Judgmentstate : MonoBehaviour
{ {
@ -83,7 +80,14 @@ public class Judgmentstate : MonoBehaviour
_ = SyncCreateRoom.SendMessageAsync(msg); _ = SyncCreateRoom.SendMessageAsync(msg);
}); });
off_btn.onClick.AddListener(() => { off_btn.onClick.AddListener(() => {
Application.Quit(); string url = Url_Exit + GlobalFlag.currentUser.login_name;
StartCoroutine(GetString(url, data =>
{
Debug.Log(data);
Application.Quit();
}));
}); });
} }

View File

@ -1,7 +1,8 @@
using LitJson; using LitJson;
using System.Collections; using System.Collections;
using UnityEngine; using UnityEngine;
using UnityEngine.Networking; using UnityEngine.Networking;
using UnityEngine.SceneManagement;
using UnityEngine.UI; using UnityEngine.UI;
using static InterfaceManager; using static InterfaceManager;
public class Login_panl : MonoBehaviour public class Login_panl : MonoBehaviour
@ -102,6 +103,28 @@ public class Login_panl : MonoBehaviour
} }
} }
/// <summary>
/// 账号用户退出
/// </summary>
/// <param name="exirOrQuit">返回 退出</param>
public void AddGetString(bool exirOrQuit)
{
string url = Url_Exit + GlobalFlag.currentUser.login_name;
StartCoroutine(GetString(url, data =>
{
Debug.Log(data);
if (exirOrQuit)
{
SceneManager.LoadScene("SampleScene");
}
else
{
Application.Quit();
}
}));
}
public void OnRegist(string msg) public void OnRegist(string msg)
{ {
//Debug.Log("OnRegist====" + msg); //Debug.Log("OnRegist====" + msg);

View File

@ -1,10 +1,11 @@
using System; using System;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine; using UnityEngine;
using UnityEngine.SceneManagement; using UnityEngine.SceneManagement;
using UnityEngine.UI; using UnityEngine.UI;
using XFrame.Core.UI; using XFrame.Core.UI;
using static InterfaceManager;
public class Main_interface_Panel : XUIPanel public class Main_interface_Panel : XUIPanel
{ {
@ -29,11 +30,33 @@ public class Main_interface_Panel : XUIPanel
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(() =>
{ {
SceneManager.LoadScene("SampleScene"); GameObject obj = GameObject.Find("Canvas");
if (obj != null)
{
Login_panl login_panl = obj.GetComponent<Login_panl>();
if (login_panl != null)
{
login_panl.AddGetString(true);
}
}
}); });
replay.onClick.AddListener(() => { ReplayPanel(); }); replay.onClick.AddListener(() => { ReplayPanel(); });
train.onClick.AddListener(() => { TrainPanel(); }); train.onClick.AddListener(() => { TrainPanel(); });
appQuet.onClick.AddListener(() => { Application.Quit(); appQuet.onClick.AddListener(() => {
GameObject obj = GameObject.Find("Canvas");
if (obj != null)
{
Login_panl login_panl = obj.GetComponent<Login_panl>();
if (login_panl != null)
{
login_panl.AddGetString(false);
}
}
//Debug.Log("退出"); //Debug.Log("退出");
}); });
} }

View File

@ -1,9 +1,6 @@
using AdamSync;
using System.Collections;
using System.Collections.Generic;
using UnityEngine; using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.UI; using UnityEngine.UI;
using static InterfaceManager;
public class Taskpanel : MonoBehaviour public class Taskpanel : MonoBehaviour
{ {
@ -122,7 +119,13 @@ public class Taskpanel : MonoBehaviour
}); });
guanji_button.onClick.AddListener(() => guanji_button.onClick.AddListener(() =>
{ {
Application.Quit(); string url = Url_Exit + GlobalFlag.currentUser.login_name;
StartCoroutine(GetString(url, data =>
{
Debug.Log(data);
Application.Quit();
}));
}); });
menu_button.onClick.AddListener(() => menu_button.onClick.AddListener(() =>
{ {

View File

@ -1,4 +1,4 @@
using System; using System;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine; using UnityEngine;
@ -243,8 +243,10 @@ public class View_Panel2 : XUIPanel
case "04": case "04":
case "05": case "05":
entering_key_btn.gameObject.SetActive(false); entering_key_btn.gameObject.SetActive(false);
append_btn.interactable = false; //append_btn.interactable = false;
scenario_btn.interactable = false; append_btn.gameObject.SetActive(false);
//scenario_btn.interactable = false;
scenario_btn.gameObject.SetActive(false);
break; break;
} }
OnRegisterFunction(); OnRegisterFunction();

View File

@ -38,7 +38,7 @@ RenderSettings:
m_ReflectionIntensity: 1 m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0} m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 1113159741} m_Sun: {fileID: 1113159741}
m_IndirectSpecularColor: {r: 0.017637905, g: 0.031211179, b: 0.06785975, a: 1} m_IndirectSpecularColor: {r: 0.16234729, g: 0.30613518, b: 0.6690394, a: 1}
m_UseRadianceAmbientProbe: 0 m_UseRadianceAmbientProbe: 0
--- !u!157 &3 --- !u!157 &3
LightmapSettings: LightmapSettings:
@ -48488,7 +48488,7 @@ RectTransform:
m_AnchorMin: {x: 0, y: 1} m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 1, y: 1} m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: -0.000030517578} m_AnchoredPosition: {x: 0, y: -0.000030517578}
m_SizeDelta: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 50}
m_Pivot: {x: 0.5, y: 1} m_Pivot: {x: 0.5, y: 1}
--- !u!114 &996536657 --- !u!114 &996536657
MonoBehaviour: MonoBehaviour:
@ -53944,6 +53944,7 @@ GameObject:
- component: {fileID: 1436809529} - component: {fileID: 1436809529}
- component: {fileID: 1436809534} - component: {fileID: 1436809534}
- component: {fileID: 1436809535} - component: {fileID: 1436809535}
- component: {fileID: 1436809536}
m_Layer: 0 m_Layer: 0
m_Name: Bootstraps m_Name: Bootstraps
m_TagString: Untagged m_TagString: Untagged
@ -54116,6 +54117,32 @@ MonoBehaviour:
devices: [] devices: []
isOnlyOne: 1 isOnlyOne: 1
unmannedAerialVehicleManages: [] unmannedAerialVehicleManages: []
--- !u!114 &1436809536
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1436809528}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 740db79d064790148b2b2fe78986e038, type: 3}
m_Name:
m_EditorClassIdentifier:
DronePosition: DronePosition
SingleDronePosition: SingleDronePosition
WRJExpel: WRJExpel
DroneWasDestroyed: DroneWasDestroyed
WRJDitch: WRJDitch
Planedata: Planedata
Lasing: Lasing
Micow: Micow
SetToBeDestroyed: SetToBeDestroyed
SetToBeDestroyedTwo: SetToBeDestroyedTwo
BandSetting: BandSetting
SweepFrequencyBand: SweepFrequencyBand
KeyTarget: KeyTarget
identification:
--- !u!1 &1444599844 --- !u!1 &1444599844
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -67787,7 +67814,7 @@ GameObject:
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
m_StaticEditorFlags: 0 m_StaticEditorFlags: 0
m_IsActive: 1 m_IsActive: 0
--- !u!224 &1719983406 --- !u!224 &1719983406
RectTransform: RectTransform:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -67871,7 +67898,7 @@ RectTransform:
m_AnchorMin: {x: 0, y: 1} m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 1, y: 1} m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: -0.000030517578} m_AnchoredPosition: {x: 0, y: -0.000030517578}
m_SizeDelta: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 50}
m_Pivot: {x: 0.5, y: 1} m_Pivot: {x: 0.5, y: 1}
--- !u!114 &1720385562 --- !u!114 &1720385562
MonoBehaviour: MonoBehaviour:
@ -69798,7 +69825,7 @@ MonoBehaviour:
m_PreInfinity: 2 m_PreInfinity: 2
m_PostInfinity: 2 m_PostInfinity: 2
m_RotationOrder: 4 m_RotationOrder: 4
randSeed: 401617593 randSeed: 4767687
isDoingTransition: 0 isDoingTransition: 0
minimumHeight: 0 minimumHeight: 0
--- !u!114 &1820978574 --- !u!114 &1820978574
@ -97959,7 +97986,7 @@ RectTransform:
m_AnchorMin: {x: 0, y: 1} m_AnchorMin: {x: 0, y: 1}
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: -948, y: 10}
m_Pivot: {x: 0, y: 1} m_Pivot: {x: 0, y: 1}
--- !u!114 &6368481658076565719 --- !u!114 &6368481658076565719
MonoBehaviour: MonoBehaviour:
@ -99515,7 +99542,7 @@ RectTransform:
m_RootOrder: 0 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: 0, y: 0} m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 20, y: 20} m_SizeDelta: {x: 20, y: 20}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
@ -99824,9 +99851,9 @@ RectTransform:
m_RootOrder: 0 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: 0, y: 0} 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: -7, y: 0}
m_Pivot: {x: 0, y: 1} m_Pivot: {x: 0, y: 1}
--- !u!114 &6368481659665436127 --- !u!114 &6368481659665436127
MonoBehaviour: MonoBehaviour:

View File

@ -1524,10 +1524,10 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
m_UiScaleMode: 0 m_UiScaleMode: 1
m_ReferencePixelsPerUnit: 100 m_ReferencePixelsPerUnit: 100
m_ScaleFactor: 1 m_ScaleFactor: 1
m_ReferenceResolution: {x: 800, y: 600} m_ReferenceResolution: {x: 1920, y: 1080}
m_ScreenMatchMode: 0 m_ScreenMatchMode: 0
m_MatchWidthOrHeight: 0 m_MatchWidthOrHeight: 0
m_PhysicalUnit: 3 m_PhysicalUnit: 3

View File

@ -138,6 +138,10 @@ public static class InterfaceManager
/// 删除设备 /// 删除设备
/// </summary> /// </summary>
public static string Url_delete { get => IpAddress + "/Handler/Thinkingfile.ashx?action=deletedevice"; } public static string Url_delete { get => IpAddress + "/Handler/Thinkingfile.ashx?action=deletedevice"; }
/// <summary>
/// 用户退出
/// </summary>
public static string Url_Exit { get => IpAddress + "/Handler/User.ashx?action=exit&login_name="; }
#endregion #endregion
@ -147,6 +151,7 @@ public static class InterfaceManager
} }
public static IEnumerator GetBytes(string url, Action<string> callback) public static IEnumerator GetBytes(string url, Action<string> callback)
{ {

View File

@ -195,7 +195,7 @@ public class MQTTManager : MonoBehaviour
Debug.Log($"<color=yellow>{$"{data}"}</color>"); Debug.Log($"<color=yellow>{$"{data}"}</color>");
string[] datas = data.Split('$'); string[] datas = data.Split('$');
if (datas[0] != GlobalFlag.currentUser.user_id) if (datas[0] != GlobalFlag.currentUser.user_id)
DeviceManager.Instance.GetSend2roomMsg(data); DeviceManager.Instance.GetSend2roomMsg(datas[1]);
} }

View File

@ -42,8 +42,8 @@ PlayerSettings:
m_SplashScreenLogos: [] m_SplashScreenLogos: []
m_VirtualRealitySplashScreen: {fileID: 0} m_VirtualRealitySplashScreen: {fileID: 0}
m_HolographicTrackingLossScreen: {fileID: 0} m_HolographicTrackingLossScreen: {fileID: 0}
defaultScreenWidth: 1080 defaultScreenWidth: 960
defaultScreenHeight: 680 defaultScreenHeight: 540
defaultScreenWidthWeb: 960 defaultScreenWidthWeb: 960
defaultScreenHeightWeb: 600 defaultScreenHeightWeb: 600
m_StereoRenderingPath: 0 m_StereoRenderingPath: 0