This commit is contained in:
YangHua 2024-01-19 09:48:57 +08:00
parent 446def5122
commit 70ed165471
5 changed files with 42 additions and 36 deletions

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.1721589, g: 0.30467987, b: 0.5980986, a: 1} m_IndirectSpecularColor: {r: 0.16286224, g: 0.30626324, b: 0.6662026, a: 1}
m_UseRadianceAmbientProbe: 0 m_UseRadianceAmbientProbe: 0
--- !u!157 &3 --- !u!157 &3
LightmapSettings: LightmapSettings:
@ -37132,12 +37132,12 @@ PrefabInstance:
- target: {fileID: 7828191145763698017, guid: 49c7b765b5b8a8845aad4c0acd9753a8, - target: {fileID: 7828191145763698017, guid: 49c7b765b5b8a8845aad4c0acd9753a8,
type: 3} type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[2].m_MethodName propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[2].m_MethodName
value: SetActive value: SwitchModelScale
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 7828191145763698017, guid: 49c7b765b5b8a8845aad4c0acd9753a8, - target: {fileID: 7828191145763698017, guid: 49c7b765b5b8a8845aad4c0acd9753a8,
type: 3} type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[2].m_Mode propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[2].m_Mode
value: 6 value: 4
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 7828191145763698017, guid: 49c7b765b5b8a8845aad4c0acd9753a8, - target: {fileID: 7828191145763698017, guid: 49c7b765b5b8a8845aad4c0acd9753a8,
type: 3} type: 3}
@ -37187,12 +37187,12 @@ PrefabInstance:
- target: {fileID: 7828191145835787467, guid: 49c7b765b5b8a8845aad4c0acd9753a8, - target: {fileID: 7828191145835787467, guid: 49c7b765b5b8a8845aad4c0acd9753a8,
type: 3} type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[2].m_MethodName propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[2].m_MethodName
value: SetActive value: SwitchModelScale
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 7828191145835787467, guid: 49c7b765b5b8a8845aad4c0acd9753a8, - target: {fileID: 7828191145835787467, guid: 49c7b765b5b8a8845aad4c0acd9753a8,
type: 3} type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[2].m_Mode propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[2].m_Mode
value: 6 value: 4
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 7828191145835787467, guid: 49c7b765b5b8a8845aad4c0acd9753a8, - target: {fileID: 7828191145835787467, guid: 49c7b765b5b8a8845aad4c0acd9753a8,
type: 3} type: 3}
@ -37242,12 +37242,12 @@ PrefabInstance:
- target: {fileID: 7828191145920499402, guid: 49c7b765b5b8a8845aad4c0acd9753a8, - target: {fileID: 7828191145920499402, guid: 49c7b765b5b8a8845aad4c0acd9753a8,
type: 3} type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[2].m_MethodName propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[2].m_MethodName
value: SetActive value: SwitchModelScale
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 7828191145920499402, guid: 49c7b765b5b8a8845aad4c0acd9753a8, - target: {fileID: 7828191145920499402, guid: 49c7b765b5b8a8845aad4c0acd9753a8,
type: 3} type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[2].m_Mode propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[2].m_Mode
value: 6 value: 4
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 7828191145920499402, guid: 49c7b765b5b8a8845aad4c0acd9753a8, - target: {fileID: 7828191145920499402, guid: 49c7b765b5b8a8845aad4c0acd9753a8,
type: 3} type: 3}
@ -37407,7 +37407,7 @@ PrefabInstance:
- target: {fileID: 7828191146970283770, guid: 49c7b765b5b8a8845aad4c0acd9753a8, - target: {fileID: 7828191146970283770, guid: 49c7b765b5b8a8845aad4c0acd9753a8,
type: 3} type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[2].m_Mode propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[2].m_Mode
value: 6 value: 4
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 7828191146970283770, guid: 49c7b765b5b8a8845aad4c0acd9753a8, - target: {fileID: 7828191146970283770, guid: 49c7b765b5b8a8845aad4c0acd9753a8,
type: 3} type: 3}
@ -37422,7 +37422,7 @@ PrefabInstance:
- target: {fileID: 7828191146970283770, guid: 49c7b765b5b8a8845aad4c0acd9753a8, - target: {fileID: 7828191146970283770, guid: 49c7b765b5b8a8845aad4c0acd9753a8,
type: 3} type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[2].m_MethodName propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[2].m_MethodName
value: SetActive value: SwitchModelScale
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 7828191146970283770, guid: 49c7b765b5b8a8845aad4c0acd9753a8, - target: {fileID: 7828191146970283770, guid: 49c7b765b5b8a8845aad4c0acd9753a8,
type: 3} type: 3}
@ -37462,12 +37462,12 @@ PrefabInstance:
- target: {fileID: 7828191147017850482, guid: 49c7b765b5b8a8845aad4c0acd9753a8, - target: {fileID: 7828191147017850482, guid: 49c7b765b5b8a8845aad4c0acd9753a8,
type: 3} type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[2].m_MethodName propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[2].m_MethodName
value: SetActive value: SwitchModelScale
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 7828191147017850482, guid: 49c7b765b5b8a8845aad4c0acd9753a8, - target: {fileID: 7828191147017850482, guid: 49c7b765b5b8a8845aad4c0acd9753a8,
type: 3} type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[2].m_Mode propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[2].m_Mode
value: 6 value: 4
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 7828191147017850482, guid: 49c7b765b5b8a8845aad4c0acd9753a8, - target: {fileID: 7828191147017850482, guid: 49c7b765b5b8a8845aad4c0acd9753a8,
type: 3} type: 3}
@ -37512,12 +37512,18 @@ RectTransform:
type: 3} type: 3}
m_PrefabInstance: {fileID: 729007800} m_PrefabInstance: {fileID: 729007800}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
--- !u!1 &729007802 stripped --- !u!114 &729007802 stripped
GameObject: MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 7828191146020959763, guid: 49c7b765b5b8a8845aad4c0acd9753a8, m_CorrespondingSourceObject: {fileID: 7828191146020959853, guid: 49c7b765b5b8a8845aad4c0acd9753a8,
type: 3} type: 3}
m_PrefabInstance: {fileID: 729007800} m_PrefabInstance: {fileID: 729007800}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 553d6fe9e2be1ee448fbaa6b5a91ac39, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &732495660 --- !u!1 &732495660
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -63564,7 +63570,7 @@ MonoBehaviour:
m_PreInfinity: 2 m_PreInfinity: 2
m_PostInfinity: 2 m_PostInfinity: 2
m_RotationOrder: 4 m_RotationOrder: 4
randSeed: 9799953 randSeed: 104423687
isDoingTransition: 0 isDoingTransition: 0
minimumHeight: 0 minimumHeight: 0
--- !u!114 &1820978574 --- !u!114 &1820978574

View File

@ -373,9 +373,12 @@ public class GameManager : MonoSingleton<GameManager>
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]));
int wrjModelCount = int.Parse(data.r2); if (!string.IsNullOrEmpty(data.r2) || data.r2 != "")
if (device.GetComponent<UnmannedAerialVehicleManage>()) {
device.GetComponent<UnmannedAerialVehicleManage>().wrjModel = (WRJModel)wrjModelCount; int wrjModelCount = int.Parse(data.r2);
if (device.GetComponent<UnmannedAerialVehicleManage>())
device.GetComponent<UnmannedAerialVehicleManage>().wrjModel = (WRJModel)wrjModelCount;
}
device.GetComponent<EquipmentCommon>().deviceID = data.id; device.GetComponent<EquipmentCommon>().deviceID = data.id;
device.GetComponent<EquipmentCommon>().FillInTheData(data.list_para); device.GetComponent<EquipmentCommon>().FillInTheData(data.list_para);
} }

View File

@ -33,14 +33,14 @@ namespace Assets.Zion.Scripts.Adam
currentWRJ = hitInfo.collider.GetComponent<WRJController>(); currentWRJ = hitInfo.collider.GetComponent<WRJController>();
if (!wRJControllers.Contains(currentWRJ)) if (!wRJControllers.Contains(currentWRJ))
wRJControllers.Add(currentWRJ); wRJControllers.Add(currentWRJ);
wrjMenuSetPanel.gameObject.SetActive(true); wrjMenuSetPanel.localScale = Vector3.one;
Vector3 posItem = GetScreenPosition(hitInfo.collider.gameObject); Vector3 posItem = GetScreenPosition(hitInfo.collider.gameObject);
wrjMenuSetPanel.anchoredPosition = new Vector3(posItem.x + 100f, posItem.y, posItem.z); wrjMenuSetPanel.anchoredPosition = new Vector3(posItem.x + 100f, posItem.y, posItem.z);
} }
} }
else else
{ {
wrjMenuSetPanel.gameObject.SetActive(false); wrjMenuSetPanel.localScale = Vector3.zero;
} }
} }

View File

@ -282,10 +282,13 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
if (colliders[i].transform.tag == "AttackTarget") if (colliders[i].transform.tag == "AttackTarget")
colliders1.Add(colliders[i]); colliders1.Add(colliders[i]);
} }
if (colliders1.Count > 0) if (colliders1.Count > 0)
{ {
isEngagedTarget = true; isEngagedTarget = true;
colliders1.ForEach(x => Debug.Log(x.transform.name)); //colliders1.ForEach(x => Debug.Log(x.transform.name));
int _number = UnityEngine.Random.Range(0, colliders1.Count - 1); int _number = UnityEngine.Random.Range(0, colliders1.Count - 1);
List<UnmannedAerialVehicle> _unmannedAerialVehicles = unmannedAerialVehicles.FindAll(x => x != null && x.gameObject.activeSelf); List<UnmannedAerialVehicle> _unmannedAerialVehicles = unmannedAerialVehicles.FindAll(x => x != null && x.gameObject.activeSelf);
SendMsg(colliders1[_number].transform); SendMsg(colliders1[_number].transform);
@ -310,7 +313,6 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
{ {
return string.Format("{0},{1},{2},{3},{4}", "SingleDronePosition", equipmentCommon.deviceID, return string.Format("{0},{1},{2},{3},{4}", "SingleDronePosition", equipmentCommon.deviceID,
attackTarget.position.x, attackTarget.position.y, attackTarget.position.z); attackTarget.position.x, attackTarget.position.y, attackTarget.position.z);
} }
@ -342,15 +344,8 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
/// <param name="weaponitemone"></param> /// <param name="weaponitemone"></param>
public void FillInTheData(List<List_paraItem> weaponitemone) public void FillInTheData(List<List_paraItem> weaponitemone)
{ {
//if (equipmentCommon)
//{
// string msg = $"send2room {equipmentCommon.equipmentType}+{transform.position.ToString().Replace(" ", "").Replace("(", "").Replace(")", "")}+{transform.eulerAngles.ToString().Replace(" ", "").Replace("(", "").Replace(")", "")}";
// Debug.Log(msg);
// _ = SyncCreateRoom.SendMessageAsync(msg);
//}
SenceInfo currentSceneInfo = new SenceInfo(); SenceInfo currentSceneInfo = new SenceInfo();
currentSceneInfo = UIBootstrap.Instance.currentSceneInfo.data; currentSceneInfo = UIBootstrap.Instance.currentSceneInfo.data;
//int windSpeed = Mathf.Lerp(0f, 1f, float.Parse(currentSceneInfo.EnvWindSpeed));
for (int i = 0; i < weaponitemone.Count; i++) for (int i = 0; i < weaponitemone.Count; i++)
{ {
switch (weaponitemone[i].para_name) switch (weaponitemone[i].para_name)
@ -512,7 +507,6 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
transform.DOKill(); transform.DOKill();
transform.LookAt(new Vector3(-500, 160, 1600)); transform.LookAt(new Vector3(-500, 160, 1600));
transform.DOMove(new Vector3(-500, 160, 1600), 60); transform.DOMove(new Vector3(-500, 160, 1600), 60);
} }
else if (interferenceMode == "迫降") else if (interferenceMode == "迫降")
{ {
@ -524,11 +518,9 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
{ {
hit.point = new Vector3(hit.point.x, hit.point.y + 3, hit.point.z); hit.point = new Vector3(hit.point.x, hit.point.y + 3, hit.point.z);
transform.DOMove(hit.point, 6); transform.DOMove(hit.point, 6);
} }
} }
} }
} }
} }
if (transmittedPower == "50~100W") if (transmittedPower == "50~100W")
@ -818,9 +810,9 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
} }
private void OnDestroy() private void OnDestroy()
{ {
StopAllCoroutines(); StopCoroutine(ShowRadarTips(0, 0));
Destroy(airRoute.gameObject);
OnActivationChanged -= OnActivationChangedHandler; OnActivationChanged -= OnActivationChangedHandler;
Destroy(airRoute.gameObject);
} }

View File

@ -17,7 +17,7 @@ public class UnmannedAerialVehicleUI : MonoBehaviour
// Start is called before the first frame update // Start is called before the first frame update
void Start() void Start()
{ {
} }
/// <summary> /// <summary>
@ -51,10 +51,15 @@ public class UnmannedAerialVehicleUI : MonoBehaviour
if (unmannedAerialVehicleManage.airRoute) if (unmannedAerialVehicleManage.airRoute)
unmannedAerialVehicleManage.airRoute.transform.localScale = Vector3.zero; unmannedAerialVehicleManage.airRoute.transform.localScale = Vector3.zero;
} }
} }
} }
public void SwitchModelScale(float scale)
{
transform.localScale = new Vector3(scale, scale, scale);
}
/// <summary> /// <summary>
/// 切换模式 /// 切换模式
/// </summary> /// </summary>