Merge branch 'master' of http://git.umayle.com:2023/yulong/NewN_UAVPlane
This commit is contained in:
commit
7969fa9585
|
@ -41,7 +41,7 @@ public class GameManager : MonoSingleton<GameManager>
|
|||
|
||||
|
||||
SyncCreateRoom.getroomusersRequset += OnGetRoomUsers;
|
||||
SyncCreateRoom.send2roomRequset += OnOtherPlayerOnline;
|
||||
SyncCreateRoom.send2roomRequset += OnRoomInfo;
|
||||
SyncPlayerTransform spt = Instantiate(playerTransformPrefab);
|
||||
spt.gameObject.SetActive(true);
|
||||
spt.gameObject.transform.position = spawnPos.position;
|
||||
|
@ -138,11 +138,12 @@ public class GameManager : MonoSingleton<GameManager>
|
|||
{
|
||||
Destroy(players[i].gameObject);
|
||||
players.RemoveAt(i);
|
||||
userIds.Remove(playerID);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void OnOtherPlayerOnline(string msg)
|
||||
public void OnRoomInfo(string msg)
|
||||
{
|
||||
StopCoroutine(WaitSpawn(msg));
|
||||
StartCoroutine(WaitSpawn(msg));
|
||||
|
@ -202,7 +203,7 @@ public class GameManager : MonoSingleton<GameManager>
|
|||
}
|
||||
break;
|
||||
case "offline":
|
||||
RemovePlayer(ulong.Parse(data[1]));
|
||||
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -311,7 +312,7 @@ public class GameManager : MonoSingleton<GameManager>
|
|||
{
|
||||
Debug.Log("OnDisable");
|
||||
SyncCreateRoom.getroomusersRequset -= OnGetRoomUsers;
|
||||
SyncCreateRoom.send2roomRequset -= OnOtherPlayerOnline;
|
||||
SyncCreateRoom.send2roomRequset -= OnRoomInfo;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ public class UIBootstrap : MonoSingleton<UIBootstrap>
|
|||
t = Jsonanalyze.FromJson<Traininginformation>(editinformation.data[i].VirtualPath);
|
||||
traininginformations.Add(t);
|
||||
}
|
||||
AdamSync.SyncCreateRoom.leaveRoomRequset += OnOtherPlayerOffline;
|
||||
AdamSync.SyncCreateRoom.leaveRoomRequset += OnLeaveRoomInfo;
|
||||
AdamSync.SyncCreateRoom.send2worldRequset += OnGetWorldInfo;
|
||||
}
|
||||
|
||||
|
@ -86,7 +86,7 @@ public class UIBootstrap : MonoSingleton<UIBootstrap>
|
|||
Debug.Log("OnGetWorldInfo====" + msg);
|
||||
GameManager.Instance.RemovePlayer(ulong.Parse(msg));
|
||||
}
|
||||
public void OnOtherPlayerOffline(string msg)
|
||||
public void OnLeaveRoomInfo(string msg)
|
||||
{
|
||||
string[] data = msg.Split(',');
|
||||
Debug.Log(data[1]);
|
||||
|
@ -100,11 +100,11 @@ public class UIBootstrap : MonoSingleton<UIBootstrap>
|
|||
private void OnDisable()
|
||||
{
|
||||
Debug.Log("OnDisable");
|
||||
AdamSync.SyncCreateRoom.leaveRoomRequset -= OnOtherPlayerOffline;
|
||||
AdamSync.SyncCreateRoom.leaveRoomRequset -= OnLeaveRoomInfo;
|
||||
}
|
||||
private void OnDestory()
|
||||
{
|
||||
Debug.Log("OnDestory");
|
||||
AdamSync.SyncCreateRoom.leaveRoomRequset -= OnOtherPlayerOffline;
|
||||
AdamSync.SyncCreateRoom.leaveRoomRequset -= OnLeaveRoomInfo;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ namespace AdamSync
|
|||
SyncCreateRoom.playerInfoRequset += ReceivePlayInfo;
|
||||
if (isPlayer)
|
||||
{
|
||||
StartCoroutine(SendMsg());
|
||||
//StartCoroutine(SendMsg());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue