コード例 #1
0
 // Use this for initialization
 void Start()
 {
     botonActivado = 0;
     gestorSQLite  = GestorSQLite.getGestorSQLite();
     constantes    = Constantes.getConstantes();
     gestionarMapas();
     getPremios();
     getOpciones();
     niebla         = Resources.Load <Texture> ("Images/niebla");
     muralla        = Resources.Load <Texture> ("Images/muralla");
     scrollPosition = new Vector2(0, -1 * rectMapas [rectMapas.Length - 1].y);
     if (Constantes.getSincronizar())
     {
         Constantes.setSincronizar(false);
         botonActivado = 3;
         cargando      = "";
         try {
             Sync   sync = Sync.getSync();
             Thread t    = new Thread(new ThreadStart(sync.sincronizacion));
             t.Start();
         } catch (Exception e) {
             Debug.Log(e);
             this.botonActivado = 0;
         }
     }
     InvokeRepeating("cambioCargando", 1f, 1f);
 }
コード例 #2
0
 protected virtual void Start()
 {
     gestorSQLite = GestorSQLite.getGestorSQLite();
     terminado    = false;
     datos        = gestorSQLite.getMinijuego(id_minijuego);
     referenciasOpciones();
     importarOpciones();
     if (tiempo == 0)
     {
         InvokeRepeating("aumentarTiempo", 0f, 0.001f);
     }
     else
     {
         tiempo = 0;
     }
 }
コード例 #3
0
    // Use this for initialization
    void Start()
    {
        cargando1 = Diccionario.getPalabra("Despertando");
        if (cargando1 == null || cargando1.Trim().Length == 0)
        {
            cargando1 = "Despertando";
        }
        cargando2 = "";
        sync      = Sync.getSync();
        int id_usuario = GestorSQLite.getGestorSQLite().obtenerUsuarioAcual();

        windowRect    = new Rect(Screen.width / 4, Screen.height / 7, Screen.width / 2, 5 * Screen.height / 7);
        windowSkin    = Resources.Load <GUISkin> ("GUISkin/Opciones/fondoOpcionesSkin");
        sincronizando = Resources.Load <GUISkin> ("GUISkin/Mapa/sincronizarSkin");
        campos        = Resources.Load <GUISkin> ("GUISkin/Login/camposSkin");
        botonSkin     = Resources.Load <GUISkin> ("GUISkin/Mapa/botonesSuperiorSkin");
        fondo         = Resources.Load <Texture2D> ("Images/fondo_login");
        if (id_usuario > 0 && !Constantes.getErrorDatos())
        {
            cuenta = true;
            try {
                sync.setId_Usuario(id_usuario);
                Thread t = new Thread(new ThreadStart(sync.sincronizacion));
                t.Start();
            } catch (Exception e) {
                Debug.Log(e);
                SceneManager.LoadScene("MapaScene");
            }
            logueando = true;
        }
        else if (Constantes.getErrorDatos())
        {
            error = Diccionario.getPalabra("Datos Incorrectos");
        }
        InvokeRepeating("cambioCargando", 1f, 1f);
    }