Esempio n. 1
0
 void BackToRightAll()
 {
     if (GUILayout.Button("Back"))
     {
         currentRight = RightGUI.ALL;
     }
 }
Esempio n. 2
0
    IEnumerator Start()
    {
        InitPlayerInfo();

        notreadytoShow = false;
                #if UNITY_IPHONE
        Social.localUser.Authenticate(
            result => {
            if (result && showAchievementBanners)
            {
                GameCenterPlatform.ShowDefaultAchievementCompletionBanner(showAchievementBanners);
                Debug.Log("Authenticated " + Social.localUser.userName);
            }
            else
            {
                Debug.Log("Failed to authenticate " + Social.localUser.userName);
            }
        }
            );
                #endif
        adBanner = GameObject.FindGameObjectWithTag("AdBanner");
        gamecode = CalculateMD5Hash(key + databaseID);
        Debug.Log(gamecode);
        currentPage  = Page.Main;
        currentSub   = LeftGUI.ALL;
        currentRight = RightGUI.ALL;
        Debug.Log(Screen.width / baseScreenWidth);

        DontDestroyOnLoad(gameObject);

        FB.Init(SetInit, OnHideUnity);

        locationFound = false;
        Input.location.Start();
        int maxWait = 10;
        while (Input.location.status == LocationServiceStatus.Initializing && maxWait > 0)
        {
            yield return(new WaitForSeconds(1));

            maxWait--;
        }
        if (maxWait < 1)
        {
            yield return(false);
        }
        if (Input.location.status == LocationServiceStatus.Failed)
        {
            yield return(false);
            //return false;
        }
        else
        {
            locationFound = true;
        }
        Input.location.Stop();
    }
Esempio n. 3
0
    void showRightAll()
    {
        GUILayout.BeginVertical();
        GUIStyle RightBox = GUI.skin.GetStyle("RightBox");

        GUILayout.Box(tex, RightBox);
        GUILayout.BeginHorizontal();
        if (GUILayout.Button("Upgrades"))
        {
            currentRight = RightGUI.UPGRADE;
        }
        if (GUILayout.Button("Shop"))
        {
            currentRight = RightGUI.UPGRADE;
        }
        if (GUILayout.Button("Options"))
        {
            currentRight = RightGUI.OPTIONS;
        }

        GUILayout.EndHorizontal();
        GUIStyle play = GUI.skin.GetStyle("PlayButton");

        if (GUILayout.Button("Play", play))
        {
            //yield return new WaitForSeconds(0.5f);
            tex = Resources.Load("element-09") as Texture;
            StartCoroutine(waitforload());
            // after release check again
            adBanner.SendMessage("HideIad");
            //Application.LoadLevel("Game1");
            StartCoroutine("loadScene", "Game1");
        }

        if (asyncOperation != null && !asyncOperation.isDone)
        {
            GUILayout.Label("PROGRESS: " + (float)asyncOperation.progress * 100 + "%");
        }
        GUILayout.EndVertical();
    }