/// <summary>
/// Migrate informations while using RPC Requests #TRY#
/// </summary>
private void MigrateInformations()
{
//MIGRATE ALL DATAS FOREACH ENEMY AND PROPS
//Start informations with the id of the previous master
string _info = $"{ hostingManagerPhotonView.owner.ID }@";
for (int i = 0; i < allAreas.Count; i++)
{
TDS_FightingArea _area = allAreas[i];
_area.ClearDeadEnemies();
if (_area.DetectionState == SpawnPointState.Enable)
{
// SEPARATE WITH & AND ADD OTHER INFOMATIONS
if (i >= 1)
{
_info += '&';
}
_info += _area.GetFightingAreaInfos();
}
}
//ADD PROPS INFORMATIONS + SEPARATE WITH @
//SEND INFORMATIONS TO THE NEW MASTER
TDS_RPCManager.Instance.RPCManagerPhotonView.RPC("ReceiveMigrationsInformations", PhotonTargets.MasterClient, _info);
hostingManagerPhotonView.TransferOwnership(PhotonNetwork.masterClient);
}