Compare commits
No commits in common. "c612770c447780f89501e76b16f24bf6eced8bb8" and "b2aa63b940ca76b37fa8e03931d543ea4bf62b44" have entirely different histories.
c612770c44
...
b2aa63b940
|
@ -83,7 +83,7 @@ public class Mastermanagement : MonoBehaviour
|
||||||
if (weapongames.Contains(obj))
|
if (weapongames.Contains(obj))
|
||||||
{
|
{
|
||||||
weapongames.Remove(obj);
|
weapongames.Remove(obj);
|
||||||
DeviceManager.Instance.RemoveDevice(obj);
|
DeviceManager.Instance.devices.Remove(obj.GetComponent<EquipmentCommon>());
|
||||||
Destroy(obj);
|
Destroy(obj);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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.16234362, g: 0.306482, b: 0.6709422, a: 1}
|
m_IndirectSpecularColor: {r: 0.030100383, g: 0.03369107, b: 0.03534769, a: 1}
|
||||||
m_UseRadianceAmbientProbe: 0
|
m_UseRadianceAmbientProbe: 0
|
||||||
--- !u!157 &3
|
--- !u!157 &3
|
||||||
LightmapSettings:
|
LightmapSettings:
|
||||||
|
@ -37848,7 +37848,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 &754191142
|
--- !u!224 &754191142
|
||||||
RectTransform:
|
RectTransform:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -49516,8 +49516,6 @@ MonoBehaviour:
|
||||||
- {fileID: 745447508}
|
- {fileID: 745447508}
|
||||||
- {fileID: 1213021907}
|
- {fileID: 1213021907}
|
||||||
mastermanagement: {fileID: 147647013}
|
mastermanagement: {fileID: 147647013}
|
||||||
postureBtn: {fileID: 1594140421}
|
|
||||||
teacherBtn: {fileID: 1565322412}
|
|
||||||
--- !u!4 &1436809530
|
--- !u!4 &1436809530
|
||||||
Transform:
|
Transform:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -59994,7 +59992,29 @@ MonoBehaviour:
|
||||||
m_TargetGraphic: {fileID: 1565322413}
|
m_TargetGraphic: {fileID: 1565322413}
|
||||||
m_OnClick:
|
m_OnClick:
|
||||||
m_PersistentCalls:
|
m_PersistentCalls:
|
||||||
m_Calls: []
|
m_Calls:
|
||||||
|
- m_Target: {fileID: 1719983405}
|
||||||
|
m_MethodName: SetActive
|
||||||
|
m_Mode: 6
|
||||||
|
m_Arguments:
|
||||||
|
m_ObjectArgument: {fileID: 0}
|
||||||
|
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||||
|
m_IntArgument: 0
|
||||||
|
m_FloatArgument: 0
|
||||||
|
m_StringArgument:
|
||||||
|
m_BoolArgument: 1
|
||||||
|
m_CallState: 2
|
||||||
|
- m_Target: {fileID: 754191141}
|
||||||
|
m_MethodName: SetActive
|
||||||
|
m_Mode: 6
|
||||||
|
m_Arguments:
|
||||||
|
m_ObjectArgument: {fileID: 0}
|
||||||
|
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||||
|
m_IntArgument: 0
|
||||||
|
m_FloatArgument: 0
|
||||||
|
m_StringArgument:
|
||||||
|
m_BoolArgument: 0
|
||||||
|
m_CallState: 2
|
||||||
--- !u!114 &1565322413
|
--- !u!114 &1565322413
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -60775,7 +60795,29 @@ MonoBehaviour:
|
||||||
m_TargetGraphic: {fileID: 1594140422}
|
m_TargetGraphic: {fileID: 1594140422}
|
||||||
m_OnClick:
|
m_OnClick:
|
||||||
m_PersistentCalls:
|
m_PersistentCalls:
|
||||||
m_Calls: []
|
m_Calls:
|
||||||
|
- m_Target: {fileID: 754191141}
|
||||||
|
m_MethodName: SetActive
|
||||||
|
m_Mode: 6
|
||||||
|
m_Arguments:
|
||||||
|
m_ObjectArgument: {fileID: 0}
|
||||||
|
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||||
|
m_IntArgument: 0
|
||||||
|
m_FloatArgument: 0
|
||||||
|
m_StringArgument:
|
||||||
|
m_BoolArgument: 1
|
||||||
|
m_CallState: 2
|
||||||
|
- m_Target: {fileID: 1719983405}
|
||||||
|
m_MethodName: SetActive
|
||||||
|
m_Mode: 6
|
||||||
|
m_Arguments:
|
||||||
|
m_ObjectArgument: {fileID: 0}
|
||||||
|
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||||
|
m_IntArgument: 0
|
||||||
|
m_FloatArgument: 0
|
||||||
|
m_StringArgument:
|
||||||
|
m_BoolArgument: 0
|
||||||
|
m_CallState: 2
|
||||||
--- !u!114 &1594140422
|
--- !u!114 &1594140422
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -63922,7 +63964,7 @@ MonoBehaviour:
|
||||||
m_PreInfinity: 2
|
m_PreInfinity: 2
|
||||||
m_PostInfinity: 2
|
m_PostInfinity: 2
|
||||||
m_RotationOrder: 4
|
m_RotationOrder: 4
|
||||||
randSeed: 683195703
|
randSeed: 3823234
|
||||||
isDoingTransition: 0
|
isDoingTransition: 0
|
||||||
minimumHeight: 0
|
minimumHeight: 0
|
||||||
--- !u!114 &1820978574
|
--- !u!114 &1820978574
|
||||||
|
@ -70850,7 +70892,7 @@ MonoBehaviour:
|
||||||
m_HorizontalOverflow: 0
|
m_HorizontalOverflow: 0
|
||||||
m_VerticalOverflow: 0
|
m_VerticalOverflow: 0
|
||||||
m_LineSpacing: 1
|
m_LineSpacing: 1
|
||||||
m_Text: "\u8FDB\u5165\u5BFC\u8C03"
|
m_Text: "\u8FDB\u5165\u6001\u52BF"
|
||||||
--- !u!222 &1972282669
|
--- !u!222 &1972282669
|
||||||
CanvasRenderer:
|
CanvasRenderer:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
|
@ -1,30 +0,0 @@
|
||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using UnityEngine;
|
|
||||||
|
|
||||||
public class PostureController : MonoBehaviour
|
|
||||||
{
|
|
||||||
public List<EquipmentCommon> redObjs = new List<EquipmentCommon>();
|
|
||||||
public List<EquipmentCommon> blueObjs = new List<EquipmentCommon>();
|
|
||||||
// Start is called before the first frame update
|
|
||||||
void Start()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// Update is called once per frame
|
|
||||||
void Update()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnEnable()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private void GetSceneInfo()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,11 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: 16abbb3ac7fac0b4a85fa24a4ceefd26
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
|
@ -92,12 +92,6 @@ public class DeviceManager : MonoSingleton<DeviceManager>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RemoveDevice(GameObject obj)
|
|
||||||
{
|
|
||||||
if (devices.Contains(obj.GetComponent<EquipmentCommon>()))
|
|
||||||
devices.Remove(obj.GetComponent<EquipmentCommon>());
|
|
||||||
}
|
|
||||||
|
|
||||||
public int GetPlayerDevice()
|
public int GetPlayerDevice()
|
||||||
{
|
{
|
||||||
List<GameObject> temp = new List<GameObject>();
|
List<GameObject> temp = new List<GameObject>();
|
||||||
|
|
|
@ -8,7 +8,6 @@ using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Tenkoku.Core;
|
using Tenkoku.Core;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.UI;
|
|
||||||
using static InterfaceManager;
|
using static InterfaceManager;
|
||||||
|
|
||||||
public class GameManager : MonoSingleton<GameManager>
|
public class GameManager : MonoSingleton<GameManager>
|
||||||
|
@ -38,20 +37,9 @@ public class GameManager : MonoSingleton<GameManager>
|
||||||
|
|
||||||
public Mastermanagement mastermanagement;
|
public Mastermanagement mastermanagement;
|
||||||
|
|
||||||
public Button postureBtn;
|
|
||||||
public Button teacherBtn;
|
|
||||||
|
|
||||||
// Start is called before the first frame update
|
// Start is called before the first frame update
|
||||||
private void Awake()
|
private void Awake()
|
||||||
{
|
{
|
||||||
postureBtn.onClick.AddListener(() =>
|
|
||||||
{
|
|
||||||
ChangeView(0);
|
|
||||||
});
|
|
||||||
teacherBtn.onClick.AddListener(() =>
|
|
||||||
{
|
|
||||||
ChangeView(2);
|
|
||||||
});
|
|
||||||
SyncCreateRoom.getroomusersRequset += OnGetRoomUsers;
|
SyncCreateRoom.getroomusersRequset += OnGetRoomUsers;
|
||||||
SyncCreateRoom.send2roomRequset += OnRoomInfo;
|
SyncCreateRoom.send2roomRequset += OnRoomInfo;
|
||||||
SyncPlayerTransform spt = Instantiate(playerTransformPrefab);
|
SyncPlayerTransform spt = Instantiate(playerTransformPrefab);
|
||||||
|
@ -199,17 +187,6 @@ public class GameManager : MonoSingleton<GameManager>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 切换视图
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="index"></param>
|
|
||||||
public void ChangeView(int index)
|
|
||||||
{
|
|
||||||
Teacher.gameObject.SetActive(index == 0);
|
|
||||||
student.gameObject.SetActive(index == 1);
|
|
||||||
posture.gameObject.SetActive(index == 2);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void AddPlayers(SyncPlayerTransform s)
|
public void AddPlayers(SyncPlayerTransform s)
|
||||||
{
|
{
|
||||||
if (!players.Contains(s))
|
if (!players.Contains(s))
|
||||||
|
@ -392,22 +369,16 @@ public class GameManager : MonoSingleton<GameManager>
|
||||||
device.transform.position = new Vector3(float.Parse(tran[1]), float.Parse(tran[2]), float.Parse(tran[3]));
|
device.transform.position = new Vector3(float.Parse(tran[1]), float.Parse(tran[2]), float.Parse(tran[3]));
|
||||||
device.transform.eulerAngles = new Vector3(float.Parse(tran[4]), float.Parse(tran[5]), float.Parse(tran[6]));
|
device.transform.eulerAngles = new Vector3(float.Parse(tran[4]), float.Parse(tran[5]), float.Parse(tran[6]));
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
string[] deviceTran = data.r1.Split(',');
|
string[] deviceTran = data.r1.Split(',');
|
||||||
|
|
||||||
device.transform.position = new Vector3(float.Parse(deviceTran[0]), float.Parse(deviceTran[1]), float.Parse(deviceTran[2]));
|
device.transform.position = new Vector3(float.Parse(deviceTran[0]), float.Parse(deviceTran[1]), float.Parse(deviceTran[2]));
|
||||||
device.transform.eulerAngles = new Vector3(float.Parse(deviceTran[3]), float.Parse(deviceTran[4]), float.Parse(deviceTran[5]));
|
device.transform.eulerAngles = new Vector3(float.Parse(deviceTran[3]), float.Parse(deviceTran[4]), float.Parse(deviceTran[5]));
|
||||||
}
|
|
||||||
if (!string.IsNullOrEmpty(data.r2) || data.r2 != "")
|
if (!string.IsNullOrEmpty(data.r2) || data.r2 != "")
|
||||||
{
|
{
|
||||||
int wrjModelCount = int.Parse(data.r2);
|
int wrjModelCount = int.Parse(data.r2);
|
||||||
UnmannedAerialVehicleManage uavm = device.GetComponent<UnmannedAerialVehicleManage>();
|
if (device.GetComponent<UnmannedAerialVehicleManage>())
|
||||||
if (uavm)
|
device.GetComponent<UnmannedAerialVehicleManage>().wrjModel = (WRJModel)wrjModelCount;
|
||||||
{
|
|
||||||
uavm.wrjModel = (WRJModel)wrjModelCount;
|
|
||||||
device.name = uavm.wrjModel.ToString();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Debug.Log($"<color=yellow>是否是player{data.r3 == GlobalFlag.currentUser.user_id}</color>");
|
Debug.Log($"<color=yellow>是否是player{data.r3 == GlobalFlag.currentUser.user_id}</color>");
|
||||||
|
@ -492,7 +463,7 @@ public class GameManager : MonoSingleton<GameManager>
|
||||||
|
|
||||||
private void OnDisable()
|
private void OnDisable()
|
||||||
{
|
{
|
||||||
Debug.Log("OnDisable GameManager");
|
Debug.Log("OnDisable");
|
||||||
Leaverroom();
|
Leaverroom();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -134,7 +134,7 @@ public class UIBootstrap : MonoSingleton<UIBootstrap>
|
||||||
|
|
||||||
private void OnDisable()
|
private void OnDisable()
|
||||||
{
|
{
|
||||||
Debug.Log("OnDisable UIBootstrap");
|
Debug.Log("OnDisable");
|
||||||
AdamSync.SyncCreateRoom.leaveRoomRequset -= OnLeaveRoomInfo;
|
AdamSync.SyncCreateRoom.leaveRoomRequset -= OnLeaveRoomInfo;
|
||||||
string _msg = "leaveroom ";
|
string _msg = "leaveroom ";
|
||||||
_ = AdamSync.SyncCreateRoom.SendMessageAsync(_msg);
|
_ = AdamSync.SyncCreateRoom.SendMessageAsync(_msg);
|
||||||
|
|
|
@ -56,7 +56,6 @@ namespace AdamSync
|
||||||
|
|
||||||
private void OnDisable()
|
private void OnDisable()
|
||||||
{
|
{
|
||||||
Debug.Log("1212");
|
|
||||||
SyncCreateRoom.CloseClint();
|
SyncCreateRoom.CloseClint();
|
||||||
isLinkAgain = false;
|
isLinkAgain = false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -127,7 +127,7 @@ public class UnmannedAerialVehicle : MonoBehaviour
|
||||||
Bao.transform.localPosition = Vector3.zero;
|
Bao.transform.localPosition = Vector3.zero;
|
||||||
Bao.transform.SetParent(null);
|
Bao.transform.SetParent(null);
|
||||||
Bao.SetActive(true);
|
Bao.SetActive(true);
|
||||||
DeviceManager.Instance.RemoveDevice(gameObject);
|
|
||||||
Destroy(gameObject);
|
Destroy(gameObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -169,11 +169,8 @@ public class UnmannedAerialVehicle : MonoBehaviour
|
||||||
Bao.transform.SetParent(null);
|
Bao.transform.SetParent(null);
|
||||||
Bao.SetActive(true);
|
Bao.SetActive(true);
|
||||||
if (_equipmentCommon)
|
if (_equipmentCommon)
|
||||||
{
|
|
||||||
DeviceManager.Instance.RemoveDevice(_transform.gameObject);
|
|
||||||
Destroy(_transform.gameObject);
|
Destroy(_transform.gameObject);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///上传日志
|
///上传日志
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -289,8 +286,7 @@ public class UnmannedAerialVehicle : MonoBehaviour
|
||||||
GameObject obj = Instantiate(bulletPrefab, bulletPoint.position, bulletPoint.rotation);
|
GameObject obj = Instantiate(bulletPrefab, bulletPoint.position, bulletPoint.rotation);
|
||||||
obj.SetActive(true);
|
obj.SetActive(true);
|
||||||
|
|
||||||
obj.transform.DOMove(v3, 2).SetEase(Ease.Linear).OnComplete(() =>
|
obj.transform.DOMove(v3, 2).SetEase(Ease.Linear).OnComplete(() => {
|
||||||
{
|
|
||||||
Destroy(obj);
|
Destroy(obj);
|
||||||
});
|
});
|
||||||
ShellBoom sb = obj.AddComponent<ShellBoom>();
|
ShellBoom sb = obj.AddComponent<ShellBoom>();
|
||||||
|
|
Loading…
Reference in New Issue