Ejemplo n.º 1
0
 void OnApplicationQuit()
 {
     if (netClient != null)
     {
         netClient.ShutDown();
     }
 }
Ejemplo n.º 2
0
    public void Parse(string command)
    {
        string[] splitCommand = command.Split(' ');

        try{
            switch (splitCommand[0])
            {
            case Send:
                Debug.Log(splitCommand[1]);
                break;

            case Disconnect:
                netClient.ShutDown();
                break;

            case Connect:
                if (splitCommand[1].Length < 1)
                {
                    Network_Client.serverAddress = "127.0.0.1";
                }
                else
                {
                    Network_Client.serverAddress = splitCommand[1];
                }
                KingGodClient.instance.Begin();
                break;

            case ConsoleLvl:
                ConsoleMsgQueue.level = int.Parse(splitCommand[1]);
                break;

            case Hide:
                ConsoleSystem.Hide();
                break;

            default:
                ConsoleMsgQueue.EnqueMsg("Invalid Command");
                break;
            }
        }catch (Exception e) {
            ConsoleMsgQueue.EnqueMsg(e.Message);
        }
    }
Ejemplo n.º 3
0
 void OnApplicationQuit()
 {
     Network_Client.ShutDown();
 }