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)
{
gamepos.gameObject.SetActive(true);
switch (Spectrumdetection.Radius)
if (gamepos)
{
case 1:
gamepos.transform.localScale = new Vector3(8, 1, 8);
break;
case 2:
gamepos.transform.localScale = new Vector3(16, 1, 16);
break;
case 3:
gamepos.transform.localScale = new Vector3(24, 1, 24);
break;
default:
break;
gamepos.gameObject.SetActive(true);
switch (Spectrumdetection.Radius)
{
case 1:
gamepos.transform.localScale = new Vector3(10, 1, 10);
break;
case 2:
gamepos.transform.localScale = new Vector3(20, 1, 20);
break;
case 3:
gamepos.transform.localScale = new Vector3(30, 1, 30);
break;
default:
break;
}
}
}
}

View File

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

View File

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

View File

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