// remote case public override void OnStartRemoteClient(StartGameMessage initialMessages) { base.OnStartRemoteClient(initialMessages); instance = this; var initialState = initialMessages.ReadInitialMessage <GameState>(); remoteMatch = new TurtleMatch(); remoteMatch.CreateFromInitialState(numRoles, onlineTurtlePrefab, initialState); }
protected override void OnStartServer() { base.OnStartServer(); instance = this; match = new TurtleMatch(); match.CreateFromSpawnPoints( numRoles, mode == Mode.OfflineMode ? offlineTurtlePrefab : onlineTurtlePrefab, FindObjectsOfType <SpawnPoint>() ); }