修改编组逻辑
This commit is contained in:
parent
20b0b3e0db
commit
96e8c51844
|
@ -32,8 +32,8 @@ Material:
|
|||
- _dispStrength: 1
|
||||
- _overBright: 1
|
||||
m_Colors:
|
||||
- _AmbientTint: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _Color: {r: 0.25, g: 0.25, b: 0.25, a: 0.040000003}
|
||||
- _AmbientTint: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _Color: {r: 0.5, g: 0.49803922, b: 0.49215686, a: 0.2}
|
||||
- _GlowColor: {r: 0.5, g: 0.5, b: 0.5, a: 0.5}
|
||||
- _PrimaryTint: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _TintColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
|
|
|
@ -38,7 +38,7 @@ RenderSettings:
|
|||
m_ReflectionIntensity: 1
|
||||
m_CustomReflection: {fileID: 0}
|
||||
m_Sun: {fileID: 1113159741}
|
||||
m_IndirectSpecularColor: {r: 0.06491052, g: 0.12166043, b: 0.26573104, a: 1}
|
||||
m_IndirectSpecularColor: {r: 0.16210404, g: 0.3058086, b: 0.66891867, a: 1}
|
||||
m_UseRadianceAmbientProbe: 0
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
|
@ -27835,8 +27835,8 @@ MonoBehaviour:
|
|||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_Type: 1
|
||||
m_Sprite: {fileID: 21300000, guid: 7a62f982c6b82d0468dbeb46934c7b76, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
|
@ -48648,7 +48648,7 @@ MonoBehaviour:
|
|||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
|
@ -48656,10 +48656,10 @@ MonoBehaviour:
|
|||
m_Calls: []
|
||||
m_FontData:
|
||||
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_FontSize: 14
|
||||
m_FontSize: 22
|
||||
m_FontStyle: 0
|
||||
m_BestFit: 0
|
||||
m_MinSize: 10
|
||||
m_MinSize: 2
|
||||
m_MaxSize: 40
|
||||
m_Alignment: 4
|
||||
m_AlignByGeometry: 0
|
||||
|
@ -50921,7 +50921,7 @@ MonoBehaviour:
|
|||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
|
@ -50929,10 +50929,10 @@ MonoBehaviour:
|
|||
m_Calls: []
|
||||
m_FontData:
|
||||
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_FontSize: 14
|
||||
m_FontSize: 22
|
||||
m_FontStyle: 0
|
||||
m_BestFit: 0
|
||||
m_MinSize: 10
|
||||
m_MinSize: 2
|
||||
m_MaxSize: 40
|
||||
m_Alignment: 4
|
||||
m_AlignByGeometry: 0
|
||||
|
@ -65906,7 +65906,7 @@ MonoBehaviour:
|
|||
m_Top: 0
|
||||
m_Bottom: 0
|
||||
m_ChildAlignment: 0
|
||||
m_Spacing: 0
|
||||
m_Spacing: 6
|
||||
m_ChildForceExpandWidth: 1
|
||||
m_ChildForceExpandHeight: 1
|
||||
m_ChildControlWidth: 0
|
||||
|
@ -68174,7 +68174,7 @@ MonoBehaviour:
|
|||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
|
@ -68182,10 +68182,10 @@ MonoBehaviour:
|
|||
m_Calls: []
|
||||
m_FontData:
|
||||
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_FontSize: 14
|
||||
m_FontSize: 22
|
||||
m_FontStyle: 0
|
||||
m_BestFit: 0
|
||||
m_MinSize: 10
|
||||
m_MinSize: 2
|
||||
m_MaxSize: 40
|
||||
m_Alignment: 4
|
||||
m_AlignByGeometry: 0
|
||||
|
@ -68701,8 +68701,8 @@ MonoBehaviour:
|
|||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_Type: 1
|
||||
m_Sprite: {fileID: 21300000, guid: 7a62f982c6b82d0468dbeb46934c7b76, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
|
@ -70081,10 +70081,10 @@ MonoBehaviour:
|
|||
colorSkyBase: {r: 0.6054902, g: 0.7090196, b: 0.7968628, a: 0.8}
|
||||
colorSkyBaseLow: {r: 0.75686276, g: 0.88627446, b: 0.9960785, a: 1}
|
||||
colorHorizon: {r: 0.9082354, g: 1.0682354, b: 1.1952941, a: 1.2}
|
||||
colorHorizonLow: {r: 0.12235295, g: 0.2964706, b: 0.36705884, a: 1.2}
|
||||
colorHorizonLow: {r: 0.9082354, g: 1.0682354, b: 1.1952941, a: 1.2}
|
||||
colorSkyAmbient: {r: 1, g: 1, b: 1, a: 1}
|
||||
colorClouds: {r: 1, g: 1, b: 1, a: 1}
|
||||
colorHighlightClouds: {r: 0, g: 0, b: 0, a: 1}
|
||||
colorHighlightClouds: {r: 1, g: 1, b: 1, a: 1}
|
||||
colorSkyboxGround: {r: 0.1102941, g: 0.08836951, b: 0.06487888, a: 1}
|
||||
colorSkyboxMie: {r: 1, g: 1, b: 1, a: 1}
|
||||
displayTime: '[ 10:30:00 AM] [ 3/6/1027 ad]'
|
||||
|
@ -70422,7 +70422,7 @@ MonoBehaviour:
|
|||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
randSeed: 430582031
|
||||
randSeed: 430664031
|
||||
isDoingTransition: 0
|
||||
minimumHeight: 0
|
||||
--- !u!114 &1820978574
|
||||
|
@ -72211,8 +72211,8 @@ MonoBehaviour:
|
|||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_Type: 1
|
||||
m_Sprite: {fileID: 21300000, guid: 7a62f982c6b82d0468dbeb46934c7b76, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
|
|
|
@ -75,15 +75,7 @@ public class FormationManager : MonoSingleton<FormationManager>
|
|||
/// </summary>
|
||||
public void SetUAVMGroupAirRoute(int uavmGroupID, Vector3 pos, DistanceMeasurement _airRoute)
|
||||
{
|
||||
List<UnmannedAerialVehicleManage> uavms = new List<UnmannedAerialVehicleManage>();
|
||||
for (int i = 0; i < formationInfos.Count; i++)
|
||||
{
|
||||
int indexI = i;
|
||||
if (formationInfos[indexI].groupName == uavmGroupID)
|
||||
{
|
||||
uavms = formationInfos[indexI].uavms;
|
||||
}
|
||||
}
|
||||
List<UnmannedAerialVehicleManage> uavms = GroupUAVM(uavmGroupID);
|
||||
for (int j = 0; j < uavms.Count; j++)
|
||||
{
|
||||
if (!uavms[j].airRoute)
|
||||
|
@ -99,6 +91,48 @@ public class FormationManager : MonoSingleton<FormationManager>
|
|||
/// </summary>
|
||||
/// <param name="uavmGroupID"></param>
|
||||
public void RemoveUAMGroupAirRoute(int uavmGroupID)
|
||||
{
|
||||
List<UnmannedAerialVehicleManage> uavms = GroupUAVM(uavmGroupID);
|
||||
for (int j = 0; j < uavms.Count; j++)
|
||||
{
|
||||
uavms[j].positions.Clear();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 设置组 航线设置
|
||||
/// </summary>
|
||||
public void SetGroupAttackByGroupID(int uavmGroupID, bool isOpen)
|
||||
{
|
||||
List<UnmannedAerialVehicleManage> uavms = GroupUAVM(uavmGroupID);
|
||||
for (int j = 0; j < uavms.Count; j++)
|
||||
{
|
||||
int index = j;
|
||||
if (isOpen)
|
||||
{
|
||||
uavms[index].RouteSettings();
|
||||
if (uavms[index].airRoute)
|
||||
uavms[index].airRoute.transform.localScale = Vector3.one;
|
||||
}
|
||||
else
|
||||
{
|
||||
uavms[index].TurnOffCourseSettings();
|
||||
if (uavms[index].airRoute)
|
||||
uavms[index].airRoute.transform.localScale = Vector3.zero;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void SetGroupUAVMState(int uavmGroupID,int patternCut)
|
||||
{
|
||||
List<UnmannedAerialVehicleManage> uavms = GroupUAVM(uavmGroupID);
|
||||
for (int j = 0; j < uavms.Count; j++)
|
||||
{
|
||||
uavms[j].modeSwitch(patternCut);
|
||||
}
|
||||
}
|
||||
|
||||
private List<UnmannedAerialVehicleManage> GroupUAVM(int uavmGroupID)
|
||||
{
|
||||
List<UnmannedAerialVehicleManage> uavms = new List<UnmannedAerialVehicleManage>();
|
||||
for (int i = 0; i < formationInfos.Count; i++)
|
||||
|
@ -109,31 +143,10 @@ public class FormationManager : MonoSingleton<FormationManager>
|
|||
uavms = formationInfos[indexI].uavms;
|
||||
}
|
||||
}
|
||||
for (int j = 0; j < uavms.Count; j++)
|
||||
{
|
||||
uavms[j].positions.Clear();
|
||||
}
|
||||
return uavms;
|
||||
}
|
||||
|
||||
//public void SetAirRouteObj(int uavmGroupID, GameObject _airRoute)
|
||||
//{
|
||||
// List<UnmannedAerialVehicleManage> uavms = new List<UnmannedAerialVehicleManage>();
|
||||
// for (int i = 0; i < formationInfos.Count; i++)
|
||||
// {
|
||||
// int indexI = i;
|
||||
// if (formationInfos[indexI].groupName == uavmGroupID)
|
||||
// {
|
||||
// uavms = formationInfos[indexI].uavms;
|
||||
// }
|
||||
// }
|
||||
// for (int j = 0; j < uavms.Count; j++)
|
||||
// {
|
||||
// if (!uavms[j].airRoute)
|
||||
// {
|
||||
// uavms[j].airRoute = _airRoute;
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
|
||||
public void OnStartFormation()
|
||||
{
|
||||
|
|
|
@ -58,11 +58,11 @@ public class DistanceMeasurement : MonoBehaviour
|
|||
markers.CopyTo(newMarkers, 0);
|
||||
newMarkers[markers.Length] = go.transform;
|
||||
markers = newMarkers;
|
||||
if (unmannedAerialVehicleManage.groupId == -1)
|
||||
if (!unmannedAerialVehicleManage.isGroup)
|
||||
unmannedAerialVehicleManage.positions.Enqueue(go.transform.position);
|
||||
else
|
||||
{
|
||||
FormationManager.Instance.SetUAVMGroupAirRoute(unmannedAerialVehicleManage.groupId, go.transform.position,this);
|
||||
FormationManager.Instance.SetUAVMGroupAirRoute(unmannedAerialVehicleManage.groupId, go.transform.position, this);
|
||||
|
||||
}
|
||||
go.transform.SetParent(transform);
|
||||
|
|
|
@ -45,14 +45,16 @@ public class UnmannedAerialVehicleUI : MonoBehaviour
|
|||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
btnFrequencyBand.onClick.AddListener(() => {
|
||||
btnFrequencyBand.onClick.AddListener(() =>
|
||||
{
|
||||
if (unmannedAerialVehicleManage)
|
||||
{
|
||||
GameManager.Instance.GetWRJParameter();
|
||||
unmannedAerialVehicleManage.FrequencyBand.SetActive(true);
|
||||
}
|
||||
});
|
||||
btnSurveillanceFrequencyBand.onClick.AddListener(() => {
|
||||
btnSurveillanceFrequencyBand.onClick.AddListener(() =>
|
||||
{
|
||||
if (unmannedAerialVehicleManage)
|
||||
{
|
||||
GameManager.Instance.GetWRJParameter();
|
||||
|
@ -94,7 +96,7 @@ public class UnmannedAerialVehicleUI : MonoBehaviour
|
|||
btnFrequencyBand.gameObject.SetActive(false);
|
||||
btnSurveillanceFrequencyBand.gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
|
||||
break;
|
||||
case WRJModel.电子侦察无人机:
|
||||
btnTheOpportuneMoment.gameObject.SetActive(true);
|
||||
|
@ -140,15 +142,29 @@ public class UnmannedAerialVehicleUI : MonoBehaviour
|
|||
{
|
||||
if (isOpen)
|
||||
{
|
||||
unmannedAerialVehicleManage.RouteSettings();
|
||||
if (unmannedAerialVehicleManage.airRoute)
|
||||
unmannedAerialVehicleManage.airRoute.transform.localScale = Vector3.one;
|
||||
if (unmannedAerialVehicleManage.isGroup)
|
||||
{
|
||||
FormationManager.Instance.SetGroupAttackByGroupID(unmannedAerialVehicleManage.groupId, isOpen);
|
||||
}
|
||||
else
|
||||
{
|
||||
unmannedAerialVehicleManage.RouteSettings();
|
||||
if (unmannedAerialVehicleManage.airRoute)
|
||||
unmannedAerialVehicleManage.airRoute.transform.localScale = Vector3.one;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
unmannedAerialVehicleManage.TurnOffCourseSettings();
|
||||
if (unmannedAerialVehicleManage.airRoute)
|
||||
unmannedAerialVehicleManage.airRoute.transform.localScale = Vector3.zero;
|
||||
if (unmannedAerialVehicleManage.isGroup)
|
||||
{
|
||||
FormationManager.Instance.SetGroupAttackByGroupID(unmannedAerialVehicleManage.groupId, isOpen);
|
||||
}
|
||||
else
|
||||
{
|
||||
unmannedAerialVehicleManage.TurnOffCourseSettings();
|
||||
if (unmannedAerialVehicleManage.airRoute)
|
||||
unmannedAerialVehicleManage.airRoute.transform.localScale = Vector3.zero;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -168,7 +184,15 @@ public class UnmannedAerialVehicleUI : MonoBehaviour
|
|||
{
|
||||
if (unmannedAerialVehicleManage)
|
||||
{
|
||||
unmannedAerialVehicleManage.modeSwitch(patternCut);
|
||||
if (unmannedAerialVehicleManage.isGroup)
|
||||
{
|
||||
FormationManager.Instance.SetGroupUAVMState(unmannedAerialVehicleManage.groupId, patternCut);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
unmannedAerialVehicleManage.modeSwitch(patternCut);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue