Пример #1
0
    public void Awake()
    {
        GameObject poRef = PersistentObjMang.getInstance();
        Transform serverTrans = poRef.transform.Find("Server");
        GameObject server_object = null;
        if(serverTrans != null){
            server_object = serverTrans.gameObject;
        }

        if (server_object == null){

            Debug.Log("Server object not instanciated; Offline session started");

            GameObject nwS = new GameObject();
            nwS.name = "Server";
            nwS.transform.parent = poRef.transform;
            server = nwS.AddComponent<ILearnRWOffline>();
            server_object = nwS;

        }else{

            server = (IServerServices)server_object.GetComponent(typeof(IServerServices));
        }
    }
Пример #2
0
 void setUpOnlineServerDual()
 {
     setUp();
     server_script = server.AddComponent<ILearnRWServer>();
     connection = server_script.requestAuthentication(userLoginData.username,userLoginData.password,userLoginData.teacher_username,userLoginData.teacher_password);
 }
Пример #3
0
 void testConnection()
 {
     setUp();
     connection_test_script = server.AddComponent<ILearnRWServer>();
     connectionTest = connection_test_script.requestServerVersion();
 }
Пример #4
0
 void setUpOfflineServer()
 {
     setUp();
     server_script = server.AddComponent<ILearnRWOffline>();
     ILearnRWOffline castVersion = (ILearnRWOffline) server_script;
     castVersion.language = LocalisationMang.langCode.ToString();
     connection = server_script.requestAuthentication(userLoginData.username,userLoginData.password);
 }