Minor changes to Room example

This commit is contained in:
MrGadget1024 2021-10-02 13:20:52 -04:00
parent b0311a5aa3
commit 7bc7b31df4
2 changed files with 15 additions and 8 deletions

View File

@ -17,9 +17,7 @@ public override void OnRoomServerSceneChanged(string sceneName)
{
// spawn the initial batch of Rewards
if (sceneName == GameplayScene)
{
Spawner.InitialSpawn();
}
}
/// <summary>

View File

@ -1,4 +1,5 @@
using UnityEngine;
using UnityEngine.SceneManagement;
namespace Mirror.Examples.NetworkRoom
{
@ -7,24 +8,32 @@ public class NetworkRoomPlayerExt : NetworkRoomPlayer
{
public override void OnStartClient()
{
// Debug.LogFormat(LogType.Log, "OnStartClient {0}", SceneManager.GetActiveScene().path);
base.OnStartClient();
//Debug.Log($"OnStartClient {gameObject}");
}
public override void OnClientEnterRoom()
{
// Debug.LogFormat(LogType.Log, "OnClientEnterRoom {0}", SceneManager.GetActiveScene().path);
//Debug.Log($"OnClientEnterRoom {SceneManager.GetActiveScene().path}");
}
public override void OnClientExitRoom()
{
// Debug.LogFormat(LogType.Log, "OnClientExitRoom {0}", SceneManager.GetActiveScene().path);
//Debug.Log($"OnClientExitRoom {SceneManager.GetActiveScene().path}");
}
public override void IndexChanged(int oldIndex, int newIndex)
{
//Debug.Log($"IndexChanged {newIndex}");
}
public override void ReadyStateChanged(bool oldReadyState, bool newReadyState)
{
// Debug.LogFormat(LogType.Log, "ReadyStateChanged {0}", newReadyState);
//Debug.Log($"ReadyStateChanged {newReadyState}");
}
public override void OnGUI()
{
base.OnGUI();
}
}
}