public GameHub( ILogger <GameHub> log, PlayersHandler playersHandler) { _log = log; _playersHandler = playersHandler; _playersHandler.SetChannel(GetChannel); }
public void Init(NetworkConnection connection, int cnnId) { this.connection = connection; this.hostId = cnnId; isStarted = false; players = connection.gameObject.GetComponent <PlayersHandler>(); objects = connection.gameObject.GetComponent <ObjectsHandler>(); objects.SetClient(this); rooms = connection.gameObject.GetComponent <RoomHandler>(); rooms.SetClient(this); }