public void Awake() { DevConsole.RegisterConsoleCommand(this, "mplayer", false); DevConsole.RegisterConsoleCommand(this, "warpto", false); DevConsole.RegisterConsoleCommand(this, "disconnect", false); ClientLogger.SetLogLevel(ClientLogger.LogLevel.ConsoleMessages | ClientLogger.LogLevel.InGameMessages); main = this; }
public MultiplayerClient(String playerId) { ClientLogger.SetLogLevel(ClientLogger.LogLevel.ConsoleMessages | ClientLogger.LogLevel.ConsoleDebug); loadedChunks = new LoadedChunks(); chunkAwarePacketReceiver = new ChunkAwarePacketReceiver(loadedChunks); client = new TcpClient(chunkAwarePacketReceiver); PacketSender = new PacketSender(client); PacketSender.PlayerId = playerId; Logic = new Logic(PacketSender); }
public void Awake() { DevConsole.RegisterConsoleCommand(this, "mplayer", false); DevConsole.RegisterConsoleCommand(this, "warpto", false); DevConsole.RegisterConsoleCommand(this, "disconnect", false); ClientLogger.SetLogLevel(ClientLogger.LogLevel.ConsoleMessages | ClientLogger.LogLevel.InGameMessages); this.gameObject.AddComponent <PlayerMovement>(); this.gameObject.AddComponent <PlayerStatsBroadcaster>(); main = this; }