public void StartGame()
{
Debug.Log("StartGame");
if (PhotonNetwork.isMasterClient)
{
PhotonNetwork.RemoveAllInstantiatedObjects();
}
ResetGameTime = float.MaxValue;
GameStarted = true;
foreach (Transform a in Fx)
{
Destroy(a.gameObject);
}
if (pv.team != Team.Spectators)
{
Debug.Log("Creating Self " + pv.team);
InstanciateShared(NetworkPlayerID, PlayerPrefab);
}
_ObsCamera.audio.PlayOneShot(go.Random());
if (PhotonNetwork.isMasterClient)
{
foreach (var a in playerViews)
{
if (a.Value != null && a.Value.bot)
{
InstanciateShared(a.Key, GetPrefab(a.Value.plType));
}
}
}
}