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;
        }
Esempio n. 2
0
 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);
 }
Esempio n. 3
0
        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;
        }