This commit is contained in:
parent
67ffe69bc8
commit
ededc3f236
|
@ -38,7 +38,7 @@ RenderSettings:
|
|||
m_ReflectionIntensity: 1
|
||||
m_CustomReflection: {fileID: 0}
|
||||
m_Sun: {fileID: 1113159741}
|
||||
m_IndirectSpecularColor: {r: 0.16302592, g: 0.30598372, b: 0.66365844, a: 1}
|
||||
m_IndirectSpecularColor: {r: 0.16230363, g: 0.30690566, b: 0.6735028, a: 1}
|
||||
m_UseRadianceAmbientProbe: 0
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
|
@ -6486,7 +6486,7 @@ Transform:
|
|||
m_LocalScale: {x: 85.66619, y: 85.66619, z: 85.66619}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 9
|
||||
m_RootOrder: 8
|
||||
m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0}
|
||||
--- !u!1 &132976234
|
||||
GameObject:
|
||||
|
@ -6651,6 +6651,36 @@ MonoBehaviour:
|
|||
deviceID:
|
||||
isPlayer: 0
|
||||
isThinck: 0
|
||||
--- !u!1 &142321708
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 142321709}
|
||||
m_Layer: 0
|
||||
m_Name: blueOriginPos
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &142321709
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 142321708}
|
||||
m_LocalRotation: {x: 0.27262092, y: -0, z: -0, w: 0.9621216}
|
||||
m_LocalPosition: {x: -502, y: 410, z: -508}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 11
|
||||
m_LocalEulerAnglesHint: {x: 31.641, y: 0, z: 0}
|
||||
--- !u!1 &147647007
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -6748,7 +6778,7 @@ RectTransform:
|
|||
- {fileID: 754191142}
|
||||
- {fileID: 1719983406}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 2
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
|
@ -19668,95 +19698,6 @@ MonoBehaviour:
|
|||
- {fileID: 4800000, guid: 47e42fe5492cba54b983609f5be3f4d0, type: 3}
|
||||
- {fileID: 4800000, guid: cf241cfaf5faaeb48bf7b1c487760fea, type: 3}
|
||||
- {fileID: 4800000, guid: c20b919d544852c41b09da975f15fc04, type: 3}
|
||||
--- !u!1001 &415777645
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: -8679921383154817045, guid: 0a7e2330d22eb904d828bb934f7517e5,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 45.7
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 0a7e2330d22eb904d828bb934f7517e5,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 134.7
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 0a7e2330d22eb904d828bb934f7517e5,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 117.6
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 0a7e2330d22eb904d828bb934f7517e5,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 0a7e2330d22eb904d828bb934f7517e5,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 0a7e2330d22eb904d828bb934f7517e5,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 0a7e2330d22eb904d828bb934f7517e5,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 0a7e2330d22eb904d828bb934f7517e5,
|
||||
type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 0a7e2330d22eb904d828bb934f7517e5,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 0a7e2330d22eb904d828bb934f7517e5,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 0a7e2330d22eb904d828bb934f7517e5,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 0a7e2330d22eb904d828bb934f7517e5,
|
||||
type: 3}
|
||||
propertyPath: m_LocalScale.x
|
||||
value: 8.64322
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 0a7e2330d22eb904d828bb934f7517e5,
|
||||
type: 3}
|
||||
propertyPath: m_LocalScale.y
|
||||
value: 8.64322
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -8679921383154817045, guid: 0a7e2330d22eb904d828bb934f7517e5,
|
||||
type: 3}
|
||||
propertyPath: m_LocalScale.z
|
||||
value: 8.64322
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 919132149155446097, guid: 0a7e2330d22eb904d828bb934f7517e5,
|
||||
type: 3}
|
||||
propertyPath: m_Name
|
||||
value: "\u519B\u4E8B\u6307\u6325\u4E2D\u5FC3"
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 919132149155446097, guid: 0a7e2330d22eb904d828bb934f7517e5,
|
||||
type: 3}
|
||||
propertyPath: m_IsActive
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 0a7e2330d22eb904d828bb934f7517e5, type: 3}
|
||||
--- !u!1 &417348009
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -46211,7 +46152,7 @@ Transform:
|
|||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 1
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
|
||||
--- !u!1001 &1165536734
|
||||
PrefabInstance:
|
||||
|
@ -48642,7 +48583,8 @@ MonoBehaviour:
|
|||
playerTransformPrefab: {fileID: 8716064937965754113, guid: efe92e3dbc7b77747979793b50eb6456,
|
||||
type: 3}
|
||||
currentSpt: {fileID: 0}
|
||||
spawnPos: {fileID: 1618372688}
|
||||
redSpawnPos: {fileID: 1618372688}
|
||||
blueSpawnPos: {fileID: 142321709}
|
||||
userIds:
|
||||
tenkokuModule: {fileID: 1820978573}
|
||||
modelsInfo: []
|
||||
|
@ -48667,7 +48609,7 @@ Transform:
|
|||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 3
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &1436809531
|
||||
MonoBehaviour:
|
||||
|
@ -59733,7 +59675,7 @@ GameObject:
|
|||
m_Component:
|
||||
- component: {fileID: 1618372688}
|
||||
m_Layer: 0
|
||||
m_Name: GameObject
|
||||
m_Name: redOriginPos
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
|
@ -59746,13 +59688,13 @@ Transform:
|
|||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1618372686}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 960, y: 540, z: 0}
|
||||
m_LocalRotation: {x: 0.0034778442, y: -0.9708267, z: 0.23934188, w: 0.014106949}
|
||||
m_LocalPosition: {x: 92, y: 355, z: 1593}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 8
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_RootOrder: 7
|
||||
m_LocalEulerAnglesHint: {x: 27.698002, y: -178.335, z: 0}
|
||||
--- !u!1 &1619882330
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -60015,7 +59957,7 @@ Transform:
|
|||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 7
|
||||
m_RootOrder: 6
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1657643400
|
||||
GameObject:
|
||||
|
@ -60915,7 +60857,7 @@ RectTransform:
|
|||
- {fileID: 1192297517}
|
||||
- {fileID: 923388778}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 4
|
||||
m_RootOrder: 3
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
|
@ -61774,7 +61716,7 @@ Transform:
|
|||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 5
|
||||
m_RootOrder: 4
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &1774650468 stripped
|
||||
MonoBehaviour:
|
||||
|
@ -62782,7 +62724,7 @@ MonoBehaviour:
|
|||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
randSeed: 450345031
|
||||
randSeed: 28899812
|
||||
isDoingTransition: 0
|
||||
minimumHeight: 0
|
||||
--- !u!114 &1820978574
|
||||
|
@ -62833,7 +62775,7 @@ Transform:
|
|||
- {fileID: 366732981}
|
||||
- {fileID: 413808734}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 10
|
||||
m_RootOrder: 9
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1822401518
|
||||
GameObject:
|
||||
|
@ -86294,7 +86236,7 @@ Transform:
|
|||
- {fileID: 698992078863223869}
|
||||
- {fileID: 1025106485868661990}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 11
|
||||
m_RootOrder: 10
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &698992079437120607
|
||||
GameObject:
|
||||
|
@ -88289,7 +88231,7 @@ Transform:
|
|||
- {fileID: 4900298107138641668}
|
||||
- {fileID: 4900298105518847837}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 6
|
||||
m_RootOrder: 5
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &4900298106786792355
|
||||
GameObject:
|
||||
|
|
|
@ -15,7 +15,8 @@ public class GameManager : MonoSingleton<GameManager>
|
|||
{
|
||||
public SyncPlayerTransform playerTransformPrefab;
|
||||
public SyncPlayerTransform currentSpt;
|
||||
public Transform spawnPos;
|
||||
public Transform redSpawnPos;
|
||||
public Transform blueSpawnPos;
|
||||
public System.Collections.Generic.List<ulong> userIds = new System.Collections.Generic.List<ulong>();
|
||||
public TenkokuModule tenkokuModule;
|
||||
public System.Collections.Generic.List<ModelInfo> modelsInfo = new System.Collections.Generic.List<ModelInfo>();
|
||||
|
@ -34,16 +35,15 @@ public class GameManager : MonoSingleton<GameManager>
|
|||
SyncCreateRoom.getroomusersRequset += OnGetRoomUsers;
|
||||
SyncCreateRoom.send2roomRequset += OnRoomInfo;
|
||||
SyncPlayerTransform spt = Instantiate(playerTransformPrefab);
|
||||
spt.gameObject.SetActive(true);
|
||||
spt.gameObject.transform.position = spawnPos.position;
|
||||
spt.gameObject.transform.eulerAngles = spawnPos.eulerAngles;
|
||||
spt.SetPlayerInfo(ulong.Parse(GlobalFlag.currentUser.user_id), GlobalFlag.currentUser.login_name, ulong.Parse(GlobalFlag.roomID), true);
|
||||
currentSpt = spt;
|
||||
AddPlayers(spt);
|
||||
ToolsBootstrap.Instance.SetCameraInfo(spt);
|
||||
//0 red 1 blue
|
||||
if (UIBootstrap.Instance.GetRoleByIDPracticeId(GlobalFlag.practiceSeatId) == "0")
|
||||
{
|
||||
spt.transform.position = redSpawnPos.position;
|
||||
spt.transform.eulerAngles = redSpawnPos.eulerAngles;
|
||||
spt.gameObject.SetActive(true);
|
||||
spt.GetComponent<Camera>().cullingMask = ~(1 << 12);
|
||||
|
||||
if (UIBootstrap.Instance.GetDeviceByName("蜂群无人机").device_count > 0)
|
||||
|
@ -58,6 +58,9 @@ public class GameManager : MonoSingleton<GameManager>
|
|||
}
|
||||
else
|
||||
{
|
||||
spt.transform.position = blueSpawnPos.position;
|
||||
spt.transform.eulerAngles = blueSpawnPos.eulerAngles;
|
||||
spt.gameObject.SetActive(true);
|
||||
spt.GetComponent<Camera>().cullingMask = ~(1 << 11);
|
||||
if (UIBootstrap.Instance.GetDeviceByName("探测雷达").device_count > 0)
|
||||
{
|
||||
|
@ -102,7 +105,7 @@ public class GameManager : MonoSingleton<GameManager>
|
|||
student.gameObject.SetActive(false);
|
||||
spt.GetComponent<Camera>().cullingMask = -1;
|
||||
}
|
||||
if (GlobalFlag.currentUser.role_code=="05")
|
||||
if (GlobalFlag.currentUser.role_code == "05")
|
||||
{
|
||||
Teacher.gameObject.SetActive(false);
|
||||
student.gameObject.SetActive(false);
|
||||
|
@ -110,8 +113,8 @@ public class GameManager : MonoSingleton<GameManager>
|
|||
spt.GetComponent<Camera>().cullingMask = -1;
|
||||
}
|
||||
|
||||
userIds.Add(ulong.Parse(GlobalFlag.currentUser.user_id));
|
||||
tenkokuModule.mainCamera = spt.transform;
|
||||
AddPlayers(spt);
|
||||
}
|
||||
|
||||
|
||||
|
@ -147,6 +150,8 @@ public class GameManager : MonoSingleton<GameManager>
|
|||
{
|
||||
players.Add(s);
|
||||
}
|
||||
if (!userIds.Contains(s.userID))
|
||||
userIds.Add(s.userID);
|
||||
}
|
||||
|
||||
public void RemovePlayer(ulong playerID)
|
||||
|
@ -179,10 +184,19 @@ public class GameManager : MonoSingleton<GameManager>
|
|||
if (!userIds.Contains(userId))
|
||||
{
|
||||
SyncPlayerTransform spt = Instantiate(playerTransformPrefab);
|
||||
//0 red 1 blue
|
||||
if (UIBootstrap.Instance.GetRoleByIDPracticeId(GlobalFlag.practiceSeatId) == "0")
|
||||
{
|
||||
spt.gameObject.transform.position = redSpawnPos.position;
|
||||
spt.gameObject.transform.eulerAngles = redSpawnPos.eulerAngles;
|
||||
}
|
||||
else
|
||||
{
|
||||
spt.gameObject.transform.position = blueSpawnPos.position;
|
||||
spt.gameObject.transform.eulerAngles = blueSpawnPos.eulerAngles;
|
||||
}
|
||||
spt.gameObject.SetActive(true);
|
||||
spt.gameObject.transform.position = spawnPos.position;
|
||||
spt.gameObject.transform.eulerAngles = spawnPos.eulerAngles;
|
||||
spt.SetPlayerInfo(ulong.Parse(data[1]), data[2], ulong.Parse(data[3]), false);
|
||||
spt.SetPlayerInfo(userId, data[2], ulong.Parse(data[3]), false);
|
||||
AddPlayers(spt);
|
||||
}
|
||||
break;
|
||||
|
@ -319,12 +333,19 @@ public class GameManager : MonoSingleton<GameManager>
|
|||
if (!userIds.Contains(ulong.Parse(userInfo[0])))
|
||||
{
|
||||
SyncPlayerTransform spt = Instantiate(playerTransformPrefab);
|
||||
//0 red 1 blue
|
||||
if (UIBootstrap.Instance.GetRoleByIDPracticeId(GlobalFlag.practiceSeatId) == "0")
|
||||
{
|
||||
spt.gameObject.transform.position = redSpawnPos.position;
|
||||
spt.gameObject.transform.eulerAngles = redSpawnPos.eulerAngles;
|
||||
}
|
||||
else
|
||||
{
|
||||
spt.gameObject.transform.position = blueSpawnPos.position;
|
||||
spt.gameObject.transform.eulerAngles = blueSpawnPos.eulerAngles;
|
||||
}
|
||||
spt.gameObject.SetActive(true);
|
||||
spt.SetPlayerInfo(ulong.Parse(userInfo[0]), userInfo[1], ulong.Parse(userInfo[2]), false);
|
||||
spt.transform.position = new Vector3(spawnPos.position.x + index * 0.5f, spawnPos.position.y, spawnPos.position.z + index * 0.5f);
|
||||
spt.transform.eulerAngles = spawnPos.eulerAngles;
|
||||
AddPlayers(spt);
|
||||
userIds.Add(ulong.Parse(userInfo[0]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,12 +32,12 @@ public class ToolsBootstrap : MonoSingleton<ToolsBootstrap>
|
|||
_fsm.AddState(new LineDrawingState(this));
|
||||
_fsm.AddState(new CircleDrawingState(this));
|
||||
_fsm.AddState(new PolygonDrawState(this));
|
||||
//_fsm.SetState(StateName.line);
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
|
||||
recordPosition = mCamera.transform.position;
|
||||
recordeulerAngles = mCamera.transform.eulerAngles;
|
||||
}
|
||||
|
||||
public void SetCameraInfo(SyncPlayerTransform syncPlayer)
|
||||
|
|
Loading…
Reference in New Issue