This commit is contained in:
yulong 2024-03-06 14:22:39 +08:00
parent 88cfe2f530
commit 0092dec619
6 changed files with 71 additions and 23 deletions

View File

@ -0,0 +1,25 @@
using System.Threading.Tasks;
using UnityEngine;
using UnityEngine.Rendering;
public class RemoveSplash
{
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSplashScreen)]
static void Init()
{
#if UNITY_WEBGL
Application.focusChanged += Application_focusChanged;
# else
Task.Run(() => { SplashScreen.Stop(SplashScreen.StopBehavior.StopImmediate); });
#endif
}
#if UNITY_WEBGL
private static void Application_focusChanged(bool obj)
{
Application.focusChanged -= Application_focusChanged;
SplashScreen.Stop(SplashScreen.StopBehavior.StopImmediate);
}
#endif
}

View File

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

View File

@ -145,21 +145,25 @@ public class HighPriorityTarget : MonoBehaviour
} }
if (Spectrumdetection.Radius > 0) if (Spectrumdetection.Radius > 0)
{ {
gamepos.gameObject.SetActive(true); if (gamepos)
switch (Spectrumdetection.Radius)
{ {
case 1: gamepos.gameObject.SetActive(true);
gamepos.transform.localScale = new Vector3(8, 1, 8); switch (Spectrumdetection.Radius)
break; {
case 2: case 1:
gamepos.transform.localScale = new Vector3(16, 1, 16); gamepos.transform.localScale = new Vector3(10, 1, 10);
break; break;
case 3: case 2:
gamepos.transform.localScale = new Vector3(24, 1, 24); gamepos.transform.localScale = new Vector3(20, 1, 20);
break; break;
default: case 3:
break; gamepos.transform.localScale = new Vector3(30, 1, 30);
break;
default:
break;
}
} }
} }
} }

View File

@ -232,7 +232,7 @@ public class LaserFireControlPlatformManger : MonoBehaviour
case "干扰距离:": case "干扰距离:":
InterferenceDistance = weaponitemone[i].para_value; InterferenceDistance = weaponitemone[i].para_value;
Receivingdistance = float.Parse(InterferenceDistance) * 500; Receivingdistance = float.Parse(InterferenceDistance) * 1000;
break; break;
case "干扰角度:": case "干扰角度:":
InterferenceAngle = weaponitemone[i].para_value; InterferenceAngle = weaponitemone[i].para_value;
@ -273,7 +273,7 @@ public class LaserFireControlPlatformManger : MonoBehaviour
Vector3 pos = camera.WorldToViewportPoint(targetPoint.position); Vector3 pos = camera.WorldToViewportPoint(targetPoint.position);
Debug.Log("攻击目标距离"+Vector3.Distance(targetPoint.position, transform.position)); Debug.Log("攻击目标距离"+Vector3.Distance(targetPoint.position, transform.position));
ispcamera = (pos.x > 0 && pos.x < 1 && pos.y > 0 && pos.y < 1 && pos.z > 0); ispcamera = (pos.x > 0 && pos.x < 1 && pos.y > 0 && pos.y < 1 && pos.z > 0);
if (ispcamera) if (Vector3.Distance(targetPoint.position, transform.position)< Receivingdistance&&ispcamera)
{ {
Debug.LogError("出现在摄像机视角里面了"); Debug.LogError("出现在摄像机视角里面了");
Vector3 cector = targetPoint.position - transform.position; Vector3 cector = targetPoint.position - transform.position;

View File

@ -336,19 +336,19 @@ public class RadarManger : MonoBehaviour
switch (size) switch (size)
{ {
case 1: case 1:
Mapsize = 24; Mapsize = 30;
break; break;
case 2: case 2:
Mapsize = 48; Mapsize = 60;
break; break;
case 3: case 3:
Mapsize = 72; Mapsize = 90;
break; break;
case 4: case 4:
Mapsize = 96; Mapsize = 120;
break; break;
case 5: case 5:
Mapsize = 120; Mapsize = 150;
break; break;
default: default:
break; break;

View File

@ -355,15 +355,23 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
switch (Spectrumdetection.Radius) switch (Spectrumdetection.Radius)
{ {
case 1: case 1:
reveal = 24; reveal = 30;
Mapdisplay(); Mapdisplay();
break; break;
case 2: case 2:
reveal = 48; reveal = 60;
Mapdisplay(); Mapdisplay();
break; break;
case 3: case 3:
reveal = 72; reveal = 90;
Mapdisplay();
break;
case 4:
reveal = 120;
Mapdisplay();
break;
case 5:
reveal = 150;
Mapdisplay(); Mapdisplay();
break; break;
default: default: