Esempio n. 1
0
 public void hideBanner()
 {
     if (isAndroidDevice())
     {
         StartAppWrapper.removeBanner();
     }
 }
Esempio n. 2
0
 public void goScene(int SceneNumber)
 {
             #if UNITY_ANDROID
     StartAppWrapper.removeBanner(StartAppWrapper.BannerPosition.TOP);
             #endif
     Time.timeScale = 1;
     SceneManager.LoadScene(SceneNumber, LoadSceneMode.Single);
 }
Esempio n. 3
0
    private void reloadStartAppBanners()
    {
        if (StartAppWrapper.checkIfBannerExists(StartAppWrapper.BannerPosition.BOTTOM))
        {
            StartAppWrapper.removeBanner(StartAppWrapper.BannerPosition.BOTTOM);
            StartAppWrapper.addBanner(StartAppWrapper.BannerType.AUTOMATIC, StartAppWrapper.BannerPosition.BOTTOM);
        }

        if (StartAppWrapper.checkIfBannerExists(StartAppWrapper.BannerPosition.TOP))
        {
            StartAppWrapper.removeBanner(StartAppWrapper.BannerPosition.TOP);
            StartAppWrapper.addBanner(StartAppWrapper.BannerType.AUTOMATIC, StartAppWrapper.BannerPosition.TOP);
        }
    }
Esempio n. 4
0
 void Start()
 {
     //Se ejecuta al iniciar la aplicacion
     sp = new ServiceAPI("cc5e4b986d3d998ac24752f4796db9da71b4ca958a405d4da416a5e254762284", "4ff997d23e3d2ae89e207a1899f0be8b3df96da3ec0118f64d7fe1859d0a6078");
     App42API.Initialize("cc5e4b986d3d998ac24752f4796db9da71b4ca958a405d4da416a5e254762284", "4ff997d23e3d2ae89e207a1899f0be8b3df96da3ec0118f64d7fe1859d0a6078");
     mystats = stats.GetComponent<infoPlayer>();
     ProgressPuzzle = PuzzleP.GetComponent<PuzzleProgress>();
     mystats.puzzles = ProgressPuzzle;
     mystats.alreadyBegun = false;
     searching.text = "Searching for matches...";
     userID.text = mystats.idplayer;
     /*
     Query q2 = QueryBuilder.Build("IDjugador1", mystats.idplayer, Operator.EQUALS);
     Query q13 = QueryBuilder.Build("IDjugador2", mystats.idplayer, Operator.EQUALS);
     Query q3 = QueryBuilder.Build("1", "16", Operator.NOT_EQUALS);
     Query q4 = QueryBuilder.Build("2", "16", Operator.NOT_EQUALS);
     Query q5 = QueryBuilder.CompoundOperator(q3, Operator.OR, q4);
     Query q14 = QueryBuilder.CompoundOperator(q2, Operator.OR, q13);
     Query q6 = QueryBuilder.CompoundOperator(q5, Operator.AND, q14);
     storageService = sp.BuildStorageService();
     storageService.FindDocumentsByQuery(dbName, collectionName, q6, callBack);
     Query q1 = QueryBuilder.Build("Full", "false", Operator.EQUALS);
     Query q7 = QueryBuilder.Build("IDplayer1", mystats.idplayer, Operator.NOT_EQUALS);
     Query q10 = QueryBuilder.CompoundOperator(q1, Operator.AND, q7);
     storageService = sp.BuildStorageService();
     storageService.FindDocumentsByQuery(dbName, collectionName, q10, callBack);
     */
     StartCoroutine(waitResponseTuyas ());
     StartCoroutine(waitResponse());
     #if UNITY_ANDROID
     StartAppWrapper.init();
     StartAppWrapper.removeBanner(StartAppWrapper.BannerPosition.BOTTOM);
     #endif
     #if UNITY_IPHONE
     StartAppWrapperiOS.unityOrientation(StartAppWrapperiOS.STAUnityOrientation.STALandscape);
     StartAppWrapperiOS.addBanner(StartAppWrapperiOS.BannerPosition.BOTTOM);
     #endif
     /*
     advertisement = banner.GetComponent<AdMobPlugin>();
     advertisement.Reconfigure();
      */
 }
Esempio n. 5
0
 public void PauseResume()
 {
     Debug.Log("PauseResume");
     if (Time.timeScale == 0)
     {
         Time.timeScale = 1;
                     #if UNITY_ANDROID
         StartAppWrapper.removeBanner(StartAppWrapper.BannerPosition.TOP);
                     #endif
     }
     else
     {
                     #if UNITY_ANDROID
         StartAppWrapper.addBanner(
             StartAppWrapper.BannerType.AUTOMATIC,
             StartAppWrapper.BannerPosition.TOP);
                     #endif
         Time.timeScale = 0;
     }
 }
    void OnGUI()
    {
        int      buttonHeight = Screen.height / 5;
        Rect     backRect     = new Rect(0, 2 * buttonHeight, Screen.width, buttonHeight);
        GUIStyle guiStyle     = new GUIStyle(GUI.skin.button);

        if (Screen.orientation == ScreenOrientation.Portrait)
        {
            guiStyle.fontSize = Screen.width / 12;
        }
        else
        {
            guiStyle.fontSize = Screen.height / 12;
        }
        if (GUI.Button(backRect, "Back", guiStyle) || Input.GetKeyUp(KeyCode.Escape))
        {
            StartAppWrapper.removeBanner(StartAppWrapper.BannerPosition.TOP);
            StartAppWrapper.removeBanner(StartAppWrapper.BannerPosition.BOTTOM);
            Application.LoadLevel(0);
        }
    }
Esempio n. 7
0
 public void HideBanner()
 {
             #if UNITY_ANDROID
     StartAppWrapper.removeBanner(StartAppWrapper.BannerPosition.TOP);
             #endif
 }