Exemplo n.º 1
0
 void Start()
 {
     ListenServer();
     ServerDev = new NetworkClient();
     networkOperations.Connect(ServerDev, NetworkOperations.ServerIP, NetworkOperations.ConnectionPort);
     ServerDev.RegisterHandler(MsgType.Disconnect, OnServerDisconnect);
     ServerDev.RegisterHandler(MsgType.Error, OnServerError);
     //SceneManager.LoadScene(SceneManager.GetSceneByName());
     //txtReceiveMsg.text = "Listen25000";
     //VideoCnv.enabled = false;
     //MenuCnv.enabled = true;
 }
Exemplo n.º 2
0
 // Use this for initialization
 void Start()
 {
     networkOperations = new NetworkOperations();
     Display           = new NetworkClient();
     Control           = new NetworkClient();
     networkOperations.Connect(Display, NetworkOperations.DisplayIP, NetworkOperations.ConnectionPort); // Connect(Screen, ScreenIP, ConnectionPort);
     networkOperations.Connect(Control, NetworkOperations.ControlIP, NetworkOperations.ConnectionPort); // Connect(Control, ControlIP, ConnectionPort);
     Display.RegisterHandler(MsgType.Disconnect, OnScreenDisconnect);
     Display.RegisterHandler(MsgType.Error, OnScreenError);
     Control.RegisterHandler(MsgType.Disconnect, OnControlDisconnect);
     Control.RegisterHandler(MsgType.Error, OnControlError);
     connectionConfig = new ConnectionConfig();
     ListenServer(); // Dinlemeye başla
     user     = new User();
     question = new Question();
     txtReceiveMsg.enabled = true;
     //Network.InitializeServer(10, 25000, false);
 }
Exemplo n.º 3
0
    void Start()
    {
        Screen.orientation = ScreenOrientation.Landscape;
        //Screen.fullScreen = true;
        networkOperations = new NetworkOperations();

        ServerDev = new NetworkClient();
        ServerDev.RegisterHandler(MsgType.Disconnect, OnServerDisconnect);
        networkOperations.Connect(ServerDev, NetworkOperations.ServerIP, NetworkOperations.ConnectionPort);

        ScreenDev = new NetworkClient();
        ScreenDev.RegisterHandler(MsgType.Disconnect, OnScreenDisconnect);
        networkOperations.Connect(ScreenDev, NetworkOperations.DisplayIP, NetworkOperations.ConnectionPort);

        //Network.InitializeServer(10, 25000, true);
        ListenServer();
        question                  = new Question();
        user                      = new User();
        user.animation.ID         = -1; user.animation.Subject = "tanimsiz"; user.Answer = false;
        subjectSelect.enabled     = false;
        QuestionAnswerCnv.enabled = false;
        Menu.enabled              = true;
    }
Exemplo n.º 4
0
 protected virtual void OnScreenDisconnect(NetworkMessage netMsg)
 {
     networkOperations.Connect(Display, NetworkOperations.DisplayIP, NetworkOperations.ConnectionPort);
     Debug.Log(netMsg.ToString());
 }
Exemplo n.º 5
0
 protected virtual void OnServerDisconnect(NetworkMessage netMsg)
 {
     networkOperations.Connect(ServerDev, NetworkOperations.ServerIP, NetworkOperations.ConnectionPort);
 }