修改生成方式
This commit is contained in:
parent
8fe23716ee
commit
f74bd50678
|
@ -38,7 +38,7 @@ RenderSettings:
|
|||
m_ReflectionIntensity: 1
|
||||
m_CustomReflection: {fileID: 0}
|
||||
m_Sun: {fileID: 1113159741}
|
||||
m_IndirectSpecularColor: {r: 0.16215044, g: 0.3062308, b: 0.67089945, a: 1}
|
||||
m_IndirectSpecularColor: {r: 0.030100383, g: 0.03369107, b: 0.03534769, a: 1}
|
||||
m_UseRadianceAmbientProbe: 0
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
|
@ -6648,6 +6648,7 @@ MonoBehaviour:
|
|||
huoPaoCtrls: []
|
||||
modelname_text: {fileID: 0}
|
||||
isDragWRJ: 1
|
||||
deviceID:
|
||||
--- !u!1 &147647007
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -48292,10 +48293,10 @@ MonoBehaviour:
|
|||
tenkokuModule: {fileID: 1820978573}
|
||||
modelsInfo: []
|
||||
dviceContent: {fileID: 1744702645}
|
||||
wrjDrag: {fileID: 3625114603376075994, guid: 504e1e72e287c0740a66218ad23fbd0e, type: 3}
|
||||
ldDrag: {fileID: 5970882834628802619, guid: beb8d369a0f07564994bb270fef9a929, type: 3}
|
||||
hpDrag: {fileID: 3438159622267457516, guid: d24981e1d16301c47a2c5d83b9d4e456, type: 3}
|
||||
wxdDrag: {fileID: 3438159622267457516, guid: 57c5ff12282ea37439abe26b94bc93b3, type: 3}
|
||||
wrjDrag: {fileID: 3625114603413174334, guid: 504e1e72e287c0740a66218ad23fbd0e, type: 3}
|
||||
ldDrag: {fileID: 5970882834658551007, guid: beb8d369a0f07564994bb270fef9a929, type: 3}
|
||||
hpDrag: {fileID: 3438159622238491400, guid: d24981e1d16301c47a2c5d83b9d4e456, type: 3}
|
||||
wxdDrag: {fileID: 3438159622238491400, guid: 57c5ff12282ea37439abe26b94bc93b3, type: 3}
|
||||
Teacher: {fileID: 754191141}
|
||||
student: {fileID: 1862065805184089353}
|
||||
--- !u!4 &1436809530
|
||||
|
@ -62188,7 +62189,7 @@ MonoBehaviour:
|
|||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
randSeed: 41044140
|
||||
randSeed: 122322625
|
||||
isDoingTransition: 0
|
||||
minimumHeight: 0
|
||||
--- !u!114 &1820978574
|
||||
|
|
|
@ -112,7 +112,7 @@ public class GameManager : MonoBehaviour
|
|||
yield return new WaitForSeconds(0.5f);
|
||||
Debug.Log(msg);
|
||||
string[] data = msg.Split(',');
|
||||
|
||||
|
||||
switch (data[0])
|
||||
{
|
||||
case "online":
|
||||
|
@ -134,18 +134,16 @@ public class GameManager : MonoBehaviour
|
|||
}
|
||||
break;
|
||||
case "无人机List":
|
||||
GameObject wrj = Instantiate(wrjDrag.model);
|
||||
wrj.transform.position = new Vector3(float.Parse(data[1]), float.Parse(data[2]), float.Parse(data[3]));
|
||||
wrj.transform.eulerAngles = new Vector3(float.Parse(data[4]), float.Parse(data[5]), float.Parse(data[6]));
|
||||
SpawnDevice(wrjDrag, data);
|
||||
break;
|
||||
case "地面无线电干扰":
|
||||
|
||||
SpawnDevice(wxdDrag, data);
|
||||
break;
|
||||
case "探测雷达":
|
||||
|
||||
SpawnDevice(ldDrag, data);
|
||||
break;
|
||||
case "激光火控平台":
|
||||
|
||||
SpawnDevice(hpDrag, data);
|
||||
break;
|
||||
case "Stop":
|
||||
GlobalFlag.isStartRehearsing = false;
|
||||
|
@ -167,6 +165,13 @@ public class GameManager : MonoBehaviour
|
|||
}
|
||||
}
|
||||
|
||||
public void SpawnDevice(DragController deviceDragBtn, string[] data)
|
||||
{
|
||||
GameObject obj = Instantiate(deviceDragBtn.model);
|
||||
obj.transform.position = new Vector3(float.Parse(data[1]), float.Parse(data[2]), float.Parse(data[3]));
|
||||
obj.transform.eulerAngles = new Vector3(float.Parse(data[4]), float.Parse(data[5]), float.Parse(data[6]));
|
||||
}
|
||||
|
||||
private void OnGetRoomUsers(string obj)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(obj)) return;
|
||||
|
|
Loading…
Reference in New Issue