修改无人机属性

This commit is contained in:
YangHua 2024-01-17 16:06:45 +08:00
parent e23c88ebea
commit de255738a9
15 changed files with 559 additions and 82 deletions

View File

@ -310,6 +310,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: d7c8a5e37f63c8e419e73f2c1b2ad41e, type: 3}
m_Name:
m_EditorClassIdentifier:
wrjModel: 0
pattern: 0
interval: 5
equipmentCommon: {fileID: -7238547075891962512}

View File

@ -182,6 +182,7 @@ MonoBehaviour:
deviceID:
isPlayer: 0
isThinck: 0
wrjModel: 0
--- !u!1 &3625114603613546360
GameObject:
m_ObjectHideFlags: 0

View File

@ -1 +1 @@
192.168.138.15:48888
127.0.0.1:48888

View File

@ -1 +1 @@
192.168.138.15
127.0.0.1

View File

@ -1860,15 +1860,15 @@ public class Scenariopage : MonoBehaviour
}
properties.Clear();//清空链表
}
for (int i = 0; i < DragManager.Instance.deviceimages.Count; i++)//判断单例生成预设体
for (int i = 0; i < DragManager.Instance.devices.Count; i++)//判断单例生成预设体
{
int index = i;
if (DragManager.Instance.deviceimages[i] != null)
if (DragManager.Instance.devices[i] != null)
{
Propertypanl pro = Instantiate(propertypanl, Panel_making);//生成预设体对象
pro.Property(DragManager.Instance.deviceimages[i].name.Replace("(Clone)", ""), () =>
pro.Property(DragManager.Instance.devices[i].name.Replace("(Clone)", ""), () =>
{
Destroy(DragManager.Instance.deviceimages[index].gameObject);//删除
Destroy(DragManager.Instance.devices[index].gameObject);//删除
Destroy(pro.gameObject);//删除
});
properties.Add(pro);
@ -1891,15 +1891,15 @@ public class Scenariopage : MonoBehaviour
//想定文件下的保存按钮
save_btn.onClick.AddListener(() =>
{
if (DragManager.Instance.deviceimages.Count > 0)//判断场景的模型是否为空
if (DragManager.Instance.devices.Count > 0)//判断场景的模型是否为空
{
for (int i = 0; i < DragManager.Instance.deviceimages.Count; i++)
for (int i = 0; i < DragManager.Instance.devices.Count; i++)
{
if (DragManager.Instance.deviceimages[i] != null)//如果链表有模型就进入
if (DragManager.Instance.devices[i] != null)//如果链表有模型就进入
{
DragManager.Instance.deviceimages[i].GetComponent<Modeldata>().SetPos();//初始化获取模型对应位置的值
DragManager.Instance.Addobj1(DragManager.Instance.deviceimages[i]);//就把对应的模型加到链表类里面
DragManager.Instance.devices[i].GetComponent<Modeldata>().SetPos();//初始化获取模型对应位置的值
DragManager.Instance.Addobj1(DragManager.Instance.devices[i]);//就把对应的模型加到链表类里面
}
}
}
@ -1907,16 +1907,16 @@ public class Scenariopage : MonoBehaviour
{
Passbyvalue();//把场景中天气插件的值传给接口
}
if (DragManager.Instance.deviceimages.Count > 0)//判断模型列表个数是否大于零
if (DragManager.Instance.devices.Count > 0)//判断模型列表个数是否大于零
{
for (int i = 0; i < DragManager.Instance.deviceimages.Count; i++)
for (int i = 0; i < DragManager.Instance.devices.Count; i++)
{
if (DragManager.Instance.deviceimages[i] != null)//如果链表里有一个物体就进去
if (DragManager.Instance.devices[i] != null)//如果链表里有一个物体就进去
{
Destroy(DragManager.Instance.deviceimages[i].gameObject);//删除链表有的物体
Destroy(DragManager.Instance.devices[i].gameObject);//删除链表有的物体
}
}
DragManager.Instance.deviceimages.Clear();//清空链表
DragManager.Instance.devices.Clear();//清空链表
}
if (DragManager.Instance.modellist.Count > 0)
{

View File

@ -38,7 +38,7 @@ RenderSettings:
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 1113159741}
m_IndirectSpecularColor: {r: 0.16234875, g: 0.30616775, b: 0.6691979, a: 1}
m_IndirectSpecularColor: {r: 0.16235185, g: 0.30592543, b: 0.6678616, a: 1}
m_UseRadianceAmbientProbe: 0
--- !u!157 &3
LightmapSettings:
@ -6651,6 +6651,7 @@ MonoBehaviour:
deviceID:
isPlayer: 0
isThinck: 0
wrjModel: 0
--- !u!224 &138577124 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 1586417955185665353, guid: 18a1ad49a084edc44b006d5905c6d928,
@ -19400,6 +19401,153 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 404543400}
m_CullTransparentMesh: 0
--- !u!1001 &405465595
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 1744702645}
m_Modifications:
- target: {fileID: 3625114602127132433, guid: 504e1e72e287c0740a66218ad23fbd0e,
type: 3}
propertyPath: m_Text
value: "\u7535\u5B50\u4FA6\u5BDF\u65E0\u4EBA\u673A"
objectReference: {fileID: 0}
- target: {fileID: 3625114603376075993, guid: 504e1e72e287c0740a66218ad23fbd0e,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3625114603376075993, guid: 504e1e72e287c0740a66218ad23fbd0e,
type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3625114603376075993, guid: 504e1e72e287c0740a66218ad23fbd0e,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3625114603376075993, guid: 504e1e72e287c0740a66218ad23fbd0e,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3625114603376075993, guid: 504e1e72e287c0740a66218ad23fbd0e,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3625114603376075993, guid: 504e1e72e287c0740a66218ad23fbd0e,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3625114603376075993, guid: 504e1e72e287c0740a66218ad23fbd0e,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3625114603376075993, guid: 504e1e72e287c0740a66218ad23fbd0e,
type: 3}
propertyPath: m_RootOrder
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3625114603376075993, guid: 504e1e72e287c0740a66218ad23fbd0e,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3625114603376075993, guid: 504e1e72e287c0740a66218ad23fbd0e,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3625114603376075993, guid: 504e1e72e287c0740a66218ad23fbd0e,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3625114603376075993, guid: 504e1e72e287c0740a66218ad23fbd0e,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3625114603376075993, guid: 504e1e72e287c0740a66218ad23fbd0e,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3625114603376075993, guid: 504e1e72e287c0740a66218ad23fbd0e,
type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3625114603376075993, guid: 504e1e72e287c0740a66218ad23fbd0e,
type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3625114603376075993, guid: 504e1e72e287c0740a66218ad23fbd0e,
type: 3}
propertyPath: m_AnchorMin.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3625114603376075993, guid: 504e1e72e287c0740a66218ad23fbd0e,
type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3625114603376075993, guid: 504e1e72e287c0740a66218ad23fbd0e,
type: 3}
propertyPath: m_AnchorMax.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3625114603376075993, guid: 504e1e72e287c0740a66218ad23fbd0e,
type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3625114603376075993, guid: 504e1e72e287c0740a66218ad23fbd0e,
type: 3}
propertyPath: m_Pivot.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 3625114603376075993, guid: 504e1e72e287c0740a66218ad23fbd0e,
type: 3}
propertyPath: m_Pivot.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 3625114603376075994, guid: 504e1e72e287c0740a66218ad23fbd0e,
type: 3}
propertyPath: m_Name
value: WRJ (1)
objectReference: {fileID: 0}
- target: {fileID: 3625114603413174334, guid: 504e1e72e287c0740a66218ad23fbd0e,
type: 3}
propertyPath: wrjModel
value: 2
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 504e1e72e287c0740a66218ad23fbd0e, type: 3}
--- !u!224 &405465596 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 3625114603376075993, guid: 504e1e72e287c0740a66218ad23fbd0e,
type: 3}
m_PrefabInstance: {fileID: 405465595}
m_PrefabAsset: {fileID: 0}
--- !u!114 &405465597 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 3625114603413174334, guid: 504e1e72e287c0740a66218ad23fbd0e,
type: 3}
m_PrefabInstance: {fileID: 405465595}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 154ea33a68384034b8bef474a9a6440d, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &409371466
GameObject:
m_ObjectHideFlags: 0
@ -36388,6 +36536,153 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1001 &627365902
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 1744702645}
m_Modifications:
- target: {fileID: 3625114602127132433, guid: 504e1e72e287c0740a66218ad23fbd0e,
type: 3}
propertyPath: m_Text
value: "\u81EA\u6740\u5F0F\u65E0\u4EBA\u673A"
objectReference: {fileID: 0}
- target: {fileID: 3625114603376075993, guid: 504e1e72e287c0740a66218ad23fbd0e,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3625114603376075993, guid: 504e1e72e287c0740a66218ad23fbd0e,
type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3625114603376075993, guid: 504e1e72e287c0740a66218ad23fbd0e,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3625114603376075993, guid: 504e1e72e287c0740a66218ad23fbd0e,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3625114603376075993, guid: 504e1e72e287c0740a66218ad23fbd0e,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3625114603376075993, guid: 504e1e72e287c0740a66218ad23fbd0e,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3625114603376075993, guid: 504e1e72e287c0740a66218ad23fbd0e,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3625114603376075993, guid: 504e1e72e287c0740a66218ad23fbd0e,
type: 3}
propertyPath: m_RootOrder
value: 2
objectReference: {fileID: 0}
- target: {fileID: 3625114603376075993, guid: 504e1e72e287c0740a66218ad23fbd0e,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3625114603376075993, guid: 504e1e72e287c0740a66218ad23fbd0e,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3625114603376075993, guid: 504e1e72e287c0740a66218ad23fbd0e,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3625114603376075993, guid: 504e1e72e287c0740a66218ad23fbd0e,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3625114603376075993, guid: 504e1e72e287c0740a66218ad23fbd0e,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3625114603376075993, guid: 504e1e72e287c0740a66218ad23fbd0e,
type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3625114603376075993, guid: 504e1e72e287c0740a66218ad23fbd0e,
type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3625114603376075993, guid: 504e1e72e287c0740a66218ad23fbd0e,
type: 3}
propertyPath: m_AnchorMin.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3625114603376075993, guid: 504e1e72e287c0740a66218ad23fbd0e,
type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3625114603376075993, guid: 504e1e72e287c0740a66218ad23fbd0e,
type: 3}
propertyPath: m_AnchorMax.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3625114603376075993, guid: 504e1e72e287c0740a66218ad23fbd0e,
type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3625114603376075993, guid: 504e1e72e287c0740a66218ad23fbd0e,
type: 3}
propertyPath: m_Pivot.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 3625114603376075993, guid: 504e1e72e287c0740a66218ad23fbd0e,
type: 3}
propertyPath: m_Pivot.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 3625114603376075994, guid: 504e1e72e287c0740a66218ad23fbd0e,
type: 3}
propertyPath: m_Name
value: WRJ (2)
objectReference: {fileID: 0}
- target: {fileID: 3625114603413174334, guid: 504e1e72e287c0740a66218ad23fbd0e,
type: 3}
propertyPath: wrjModel
value: 3
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 504e1e72e287c0740a66218ad23fbd0e, type: 3}
--- !u!224 &627365903 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 3625114603376075993, guid: 504e1e72e287c0740a66218ad23fbd0e,
type: 3}
m_PrefabInstance: {fileID: 627365902}
m_PrefabAsset: {fileID: 0}
--- !u!114 &627365904 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 3625114603413174334, guid: 504e1e72e287c0740a66218ad23fbd0e,
type: 3}
m_PrefabInstance: {fileID: 627365902}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 154ea33a68384034b8bef474a9a6440d, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &628518900
GameObject:
m_ObjectHideFlags: 0
@ -48376,6 +48671,153 @@ MeshFilter:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1371902099}
m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0}
--- !u!1001 &1378953170
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 1744702645}
m_Modifications:
- target: {fileID: 3625114602127132433, guid: 504e1e72e287c0740a66218ad23fbd0e,
type: 3}
propertyPath: m_Text
value: "\u5149\u5B66\u4FA6\u5BDF\u65E0\u4EBA\u673A"
objectReference: {fileID: 0}
- target: {fileID: 3625114603376075993, guid: 504e1e72e287c0740a66218ad23fbd0e,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3625114603376075993, guid: 504e1e72e287c0740a66218ad23fbd0e,
type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3625114603376075993, guid: 504e1e72e287c0740a66218ad23fbd0e,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3625114603376075993, guid: 504e1e72e287c0740a66218ad23fbd0e,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3625114603376075993, guid: 504e1e72e287c0740a66218ad23fbd0e,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3625114603376075993, guid: 504e1e72e287c0740a66218ad23fbd0e,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3625114603376075993, guid: 504e1e72e287c0740a66218ad23fbd0e,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3625114603376075993, guid: 504e1e72e287c0740a66218ad23fbd0e,
type: 3}
propertyPath: m_RootOrder
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3625114603376075993, guid: 504e1e72e287c0740a66218ad23fbd0e,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3625114603376075993, guid: 504e1e72e287c0740a66218ad23fbd0e,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3625114603376075993, guid: 504e1e72e287c0740a66218ad23fbd0e,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3625114603376075993, guid: 504e1e72e287c0740a66218ad23fbd0e,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3625114603376075993, guid: 504e1e72e287c0740a66218ad23fbd0e,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3625114603376075993, guid: 504e1e72e287c0740a66218ad23fbd0e,
type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3625114603376075993, guid: 504e1e72e287c0740a66218ad23fbd0e,
type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3625114603376075993, guid: 504e1e72e287c0740a66218ad23fbd0e,
type: 3}
propertyPath: m_AnchorMin.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3625114603376075993, guid: 504e1e72e287c0740a66218ad23fbd0e,
type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3625114603376075993, guid: 504e1e72e287c0740a66218ad23fbd0e,
type: 3}
propertyPath: m_AnchorMax.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3625114603376075993, guid: 504e1e72e287c0740a66218ad23fbd0e,
type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3625114603376075993, guid: 504e1e72e287c0740a66218ad23fbd0e,
type: 3}
propertyPath: m_Pivot.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 3625114603376075993, guid: 504e1e72e287c0740a66218ad23fbd0e,
type: 3}
propertyPath: m_Pivot.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 3625114603376075994, guid: 504e1e72e287c0740a66218ad23fbd0e,
type: 3}
propertyPath: m_Name
value: WRJ
objectReference: {fileID: 0}
- target: {fileID: 3625114603413174334, guid: 504e1e72e287c0740a66218ad23fbd0e,
type: 3}
propertyPath: wrjModel
value: 1
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 504e1e72e287c0740a66218ad23fbd0e, type: 3}
--- !u!224 &1378953171 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 3625114603376075993, guid: 504e1e72e287c0740a66218ad23fbd0e,
type: 3}
m_PrefabInstance: {fileID: 1378953170}
m_PrefabAsset: {fileID: 0}
--- !u!114 &1378953172 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 3625114603413174334, guid: 504e1e72e287c0740a66218ad23fbd0e,
type: 3}
m_PrefabInstance: {fileID: 1378953170}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 154ea33a68384034b8bef474a9a6440d, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &1388943276
GameObject:
m_ObjectHideFlags: 0
@ -48950,7 +49392,15 @@ MonoBehaviour:
Teacher: {fileID: 754191141}
student: {fileID: 1862065805184089353}
posture: {fileID: 1719983405}
wrjCount: 0
players: []
gxWRJIds: []
otherWRJIDs: []
wrjIDs: []
wrjDrags:
- {fileID: 1378953172}
- {fileID: 405465597}
- {fileID: 627365904}
--- !u!4 &1436809530
Transform:
m_ObjectHideFlags: 0
@ -61771,7 +62221,10 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Children:
- {fileID: 1378953171}
- {fileID: 405465596}
- {fileID: 627365903}
m_Father: {fileID: 1913435859}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -63114,7 +63567,7 @@ MonoBehaviour:
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
randSeed: 2139429468
randSeed: 1015000
isDoingTransition: 0
minimumHeight: 0
--- !u!114 &1820978574

View File

@ -219,8 +219,8 @@ GameObject:
serializedVersion: 6
m_Component:
- component: {fileID: 2132962759}
- component: {fileID: 2132962758}
- component: {fileID: 2132962760}
- component: {fileID: 2132962758}
m_Layer: 0
m_Name: Net
m_TagString: Untagged

View File

@ -16,8 +16,18 @@ public class DragController : MonoBehaviour, IBeginDragHandler, IEndDragHandler,
public string deviceID;
public bool isPlayer = false;
public bool isThinck = false;
public WRJModel wrjModel = WRJModel.;
public void OnBeginDrag(PointerEventData eventData)
{
if (isDragWRJ)
{
if (DragManager.Instance.devices.Count == GameManager.Instance.wrjCount)
{
return;
}
}
if (model == null)
{
model = Instantiate(prefabItem);
@ -41,14 +51,18 @@ public class DragController : MonoBehaviour, IBeginDragHandler, IEndDragHandler,
{
if (!isThinck)
{
model.GetComponent<EquipmentCommon>().isPlayer = true;
model.GetComponent<EquipmentCommon>().isStartRehearsing = GlobalFlag.isStartRehearsing;
List<List_paraItem> temp = UIBootstrap.Instance.GetListParaItemById(deviceID);
model.GetComponent<EquipmentCommon>().FillInTheData(temp);
//
//
transform.SetAsLastSibling();
transform.localScale = Vector3.zero;
if (model.GetComponent<UnmannedAerialVehicleManage>())
model.GetComponent<UnmannedAerialVehicleManage>().wrjModel = wrjModel;
if (!isDragWRJ)
{
transform.SetAsLastSibling();
transform.localScale = Vector3.zero;
}
}
if (DragManager.Instance != null)
{

View File

@ -10,7 +10,7 @@ using XFrame.Core.Utils;
public class DragManager : MonoSingleton<DragManager>
{
public List<Modelequipment> deviceimages1 = new List<Modelequipment>();//把最终场景中存在的模型放入链表当中
public List<GameObject> deviceimages = new List<GameObject>();//把最开始生成在场景中的模型存入链表
public List<GameObject> devices = new List<GameObject>();//把最开始生成在场景中的模型存入链表
public List<string> modellist = new List<string>();//存入最开始场景生成模型的名字
public Dictionary<string,int> model = new Dictionary<string,int>();
@ -36,7 +36,7 @@ public class DragManager : MonoSingleton<DragManager>
//}
public void AddObj(GameObject obj)
{
deviceimages.Add(obj);//把生成的预设体放入链表当中
devices.Add(obj);//把生成的预设体放入链表当中
}
public void Addobj1(GameObject obj)
{

View File

@ -4,6 +4,7 @@ using RDate;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using Tenkoku.Core;
using UnityEngine;
using static InterfaceManager;
@ -27,7 +28,14 @@ public class GameManager : MonoSingleton<GameManager>
public GameObject Teacher;
public GameObject student;
public GameObject posture;
public int wrjCount;
public List<SyncPlayerTransform> players = new List<SyncPlayerTransform>();
public DragController[] wrjDrags;
// Start is called before the first frame update
private void Awake()
{
@ -45,18 +53,30 @@ public class GameManager : MonoSingleton<GameManager>
spt.gameObject.SetActive(true);
spt.GetComponent<Camera>().cullingMask = ~(1 << 12);
spt.GetComponent<Camera>().cullingMask = ~(1 << 15);
if (UIBootstrap.Instance.GetDeviceByName("蜂群无人机").device_count > 0)
AdamThinkDevicesData.DataItem diTemp = UIBootstrap.Instance.GetDeviceByName("蜂群无人机");
if (diTemp.device_count > 0)
{
for (int i = 0; i < UIBootstrap.Instance.GetDeviceByName("蜂群无人机").device_count; i++)
wrjCount = diTemp.device_count;
for (int i = 0; i < wrjDrags.Length; i++)
{
DragController wrj = Instantiate(wrjDrag, dviceContent);
wrj.isPlayer = true;
wrj.deviceID = UIBootstrap.Instance.GetDeviceByName("蜂群无人机").id;
wrjDrags[i].isPlayer = true;
wrjDrags[i].deviceID = UIBootstrap.Instance.GetDeviceByName("蜂群无人机").id;
}
}
for (int i = 0; i < diTemp.list_para.Count; i++)
{
if (diTemp.list_para[i].para_name.Contains("光学侦察能力") && diTemp.list_para[i].para_value == "1")
{
wrjDrags[0].gameObject.SetActive(false);
}
}
}
else
{
for (int i = 0; i < dviceContent.childCount; i++)
{
Destroy(dviceContent.GetChild(i).gameObject);
}
spt.transform.position = blueSpawnPos.position;
spt.transform.eulerAngles = blueSpawnPos.eulerAngles;
spt.gameObject.SetActive(true);
@ -328,7 +348,7 @@ public class GameManager : MonoSingleton<GameManager>
SpawnDevice(hpDrag.prefabItem, deviceData.data[i]);
break;
case "频谱探测":
SpawnDevice(ppDrag.prefabItem,deviceData.data[i]);
SpawnDevice(ppDrag.prefabItem, deviceData.data[i]);
break;
case "微波武器":
SpawnDevice(wbDrag.prefabItem, deviceData.data[i]);
@ -355,7 +375,7 @@ public class GameManager : MonoSingleton<GameManager>
device.GetComponent<EquipmentCommon>().deviceID = data.id;
device.GetComponent<EquipmentCommon>().FillInTheData(data.list_para);
}
private void OnGetRoomUsers(string obj)
{
if (!string.IsNullOrWhiteSpace(obj))
@ -400,8 +420,8 @@ public class GameManager : MonoSingleton<GameManager>
tenkokuModule.weather_SnowAmt = Mathf.Lerp(0f, 1f, float.Parse(UIBootstrap.Instance.currentSceneInfo.data.EnvSnow));
tenkokuModule.weather_WindAmt = Mathf.Lerp(0f, 1f, float.Parse(UIBootstrap.Instance.currentSceneInfo.data.EnvWindSpeed));
tenkokuModule.weather_WindDir = Mathf.Lerp(0f, 360f, float.Parse(UIBootstrap.Instance.currentSceneInfo.data.EnvWindDir));
tenkokuModule.weather_OvercastAmt = Mathf.Lerp(0f, 1f, 1-(float.Parse(UIBootstrap.Instance.currentSceneInfo.data.EnvLight)/10));
tenkokuModule.weather_humidity = Mathf.Lerp(0f, 1f,1- (float.Parse(UIBootstrap.Instance.currentSceneInfo.data.EnvWu) / 100));
tenkokuModule.weather_OvercastAmt = Mathf.Lerp(0f, 1f, 1 - (float.Parse(UIBootstrap.Instance.currentSceneInfo.data.EnvLight) / 10));
tenkokuModule.weather_humidity = Mathf.Lerp(0f, 1f, 1 - (float.Parse(UIBootstrap.Instance.currentSceneInfo.data.EnvWu) / 100));
Debug.LogError(tenkokuModule.weather_humidity);
Debug.LogError(tenkokuModule.weather_OvercastAmt);
}

View File

@ -9,7 +9,7 @@ using static InterfaceManager;
public class UIBootstrap : MonoSingleton<UIBootstrap>
{
//private string url = Url_GetAllThinkData;
private string sceneInfoUrl = Url_GetSceneInfo;
private string sceneInfoUrl;
public Editinformation editinformation = new Editinformation();
public SceneRoot currentSceneInfo = new SceneRoot();
public List<RSData.SubjectDataItem> subjectInfo = new List<RSData.SubjectDataItem>();
@ -21,6 +21,8 @@ public class UIBootstrap : MonoSingleton<UIBootstrap>
// Start is called before the first frame update
private async void Start()
{
sceneInfoUrl = Url_GetSceneInfo;
Debug.LogError(Url_GetAllThinkData);
editinformation = await AsyncWebReq.Post<Editinformation>(Url_GetAllThinkData, null);
for (int i = 0; i < editinformation.data.Count; i++)
{

View File

@ -1,4 +1,5 @@
using System;
using AdamSync;
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
@ -16,18 +17,13 @@ public class AddConfing : MonoBehaviour
private void Awake()
{
StartCoroutine(GetSetting(ipSetting, (data) =>
{
string[] datas= data.ToString().Split(':');
//Debug.Log(IP);
//Debug.Log(Port);
//Debug.Log(Url_Action);
IP = datas[0];
Port = datas[1];
//Debug.Log(IP);
//Debug.Log(Port);
//Debug.Log(Url_Action);
}));
string[] datas = ContectServer.ReadFromLocal("IPPort.txt").Split(':');
//Debug.Log(IP);
//Debug.Log(Port);
//Debug.Log(Url_Action);
IP = datas[0];
Port = datas[1];
}

View File

@ -9,7 +9,7 @@ using Newtonsoft.Json.Linq;
public static class InterfaceManager
{
private static string _IP = "172.16.1.118";
private static string _IP;
public static string IP
{
get { return _IP; }
@ -19,7 +19,7 @@ public static class InterfaceManager
_IP = value;
}
}
private static string _Port = "48888";
private static string _Port;
public static string Port
{
get { return _Port; }
@ -100,7 +100,7 @@ public static class InterfaceManager
/// <summary>
/// 获取房间ID并添加房间
/// </summary>
public static string Url_GetRoomID{get => IpAddress + "/Handler/Practice.ashx?action=add&Name=";}
public static string Url_GetRoomID { get => IpAddress + "/Handler/Practice.ashx?action=add&Name="; }
/// <summary>
/// 更新房间状态
/// </summary>
@ -142,7 +142,7 @@ public static class InterfaceManager
using (System.IO.StreamReader reader = new System.IO.StreamReader(path)) { return reader.ReadToEnd(); }
}
public static IEnumerator GetBytes(string url, Action<string> callback)
{
@ -221,10 +221,10 @@ public static class InterfaceManager
}
}
public static IEnumerator PostString(string url, WWWForm formdata, Dictionary<string, string> headers = null, Action<string> callback = null)
{
@ -279,7 +279,7 @@ public static class InterfaceManager
}
}
public static IEnumerator GetString(string url, Dictionary<string, string> headers = null,int time=50,Action<string> callback = null)
public static IEnumerator GetString(string url, Dictionary<string, string> headers = null, int time = 50, Action<string> callback = null)
{
while (true)
{

View File

@ -13,6 +13,7 @@ using Newtonsoft.Json;
/// </summary>
public class UnmannedAerialVehicle : MonoBehaviour
{
public WRJModel wrjModel = WRJModel.;
/// <summary>
/// 所属无人机蜂群
/// </summary>
@ -70,9 +71,6 @@ public class UnmannedAerialVehicle : MonoBehaviour
/// </summary>
public GameObject explodePrefab;
private void OnTriggerEnter(Collider other)
{
@ -85,6 +83,16 @@ public class UnmannedAerialVehicle : MonoBehaviour
}
}
/// <summary>
/// 设置无人机类型
/// </summary>
/// <param name="wrjModel"></param>
public void SetWRJModel(WRJModel _wrjModel)
{
wrjModel = _wrjModel;
}
/// <summary>
/// 被攻击
/// </summary>

View File

@ -20,11 +20,12 @@ public enum WRJModel
/// </summary>
public class UnmannedAerialVehicleManage : MonoBehaviour
{
public WRJModel wrjModel = WRJModel.;
/// <summary>
/// 无人机状态
/// </summary>
public Pattern pattern = Pattern.;
public WRJModel wrjModel = WRJModel.;
public static List<UnmannedAerialVehicleManage> unmannedAerialVehicleManages = new List<UnmannedAerialVehicleManage>();
#region
private bool _isStartRehearsing = false;
@ -149,25 +150,6 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
OnActivationChanged += OnActivationChangedHandler;
}
/// <summary>
/// 设置无人机类型
/// </summary>
/// <param name="wrjModel"></param>
public void SetWRJModel()
{
switch (wrjModel)
{
case WRJModel.:
Debug.Log("光学无人机");
break;
case WRJModel.:
Debug.Log("电子侦察无人机");
break;
case WRJModel.:
Debug.Log("自杀式无人机");
break;
}
}
[ContextMenu("Test")]
public void Test()
@ -196,7 +178,7 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
break;
}
var _unmannedAerialVehicle = unmannedAerialVehicles.FindAll(x => x != null);
var _unmannedAerialVehicle = unmannedAerialVehicles.FindAll(x => x != null&&x.gameObject.activeInHierarchy);
if (_unmannedAerialVehicle.Count == 0)
{
string nowData = string.Format("{0},{1}", "SetToBeDestroyed", equipmentCommon.deviceID);
@ -282,7 +264,7 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
isEngagedTarget = true;
colliders1.ForEach(x => Debug.Log(x.transform.name));
int _number = UnityEngine.Random.Range(0, colliders1.Count - 1);
List<UnmannedAerialVehicle> _unmannedAerialVehicles = unmannedAerialVehicles.FindAll(x => x != null);
List<UnmannedAerialVehicle> _unmannedAerialVehicles = unmannedAerialVehicles.FindAll(x => x != null&&x.gameObject.activeInHierarchy);
SendMsg(colliders1[_number].transform);
for (int i = 0; i < _unmannedAerialVehicles.Count; i++)
{
@ -467,7 +449,7 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
unmannedAerialVehicles[i].dataLinkCommunicationFrequency = dataLinkCommunicationFrequency;
unmannedAerialVehicles[i].electronicReconnaissanceCapability = electronicReconnaissanceCapability;
unmannedAerialVehicles[i].opticalReconnaissanceCapability = opticalReconnaissanceCapability;
unmannedAerialVehicles[i].wrjModel = wrjModel;
}
}
}