Esempio n. 1
0
    void Start()
    {
        base.Start();
        if (connectingScreen.activeSelf)
        {
            connectingScreen.SetActive(false);
        }
        try {
            base.player_Image.GetComponent <Image> ().sprite = Resources.Load <Sprite> ("Avtar/" + PlayerPrefs.GetString(GetPlayerDetailsTags.PLAYER_IMAGE));
        } catch (System.Exception ex) {
            Debug.Log("Exception " + ex.Message);
            base.player_Image.GetComponent <Image> ().sprite = Resources.Load <Sprite> ("user");
        }

        try {
            //JoinBtn = transform.Find ("joinBtn").gameObject;
            JoinBtn.SetActive(false);
        } catch (System.Exception ex) {
            Debug.Log("Exception " + ex.Message);
            base.player_Image.GetComponent <Image> ().sprite = Resources.Load <Sprite> ("user");
        }

        try {
            //base.coin = int.Parse(PlayerPrefs.GetString(PlayerDetails.Coin));
            //PlayerTotalCoin = GameObject.Find ("CoinText");
            base.totalCoin.GetComponent <Text> ().text = "" + base.coin;
        } catch (System.Exception ex) {
            Debug.Log(ex.Message);
        }

        try {
            //statusMsg = transform.Find ("statusMsg").gameObject;
            //SeeBtn = transform.Find ("SeeBtn").gameObject;
            if (SeeBtn)
            {
                SeeBtn.SetActive(false);
            }
            //TipBtn = GameObject.Find ("Tipbutton");

            base.player_id = PlayerPrefs.GetString(PrefebTagsTeenpatti.PLAYER_ID);
            //base.name = GameControllerTeenPatti.UppercaseFirst (PlayerPrefs.GetString (PlayerDetails.RealName));
            base.player_name.GetComponent <Text> ().text = GameControllerTeenPatti.UppercaseFirst(PlayerPrefs.GetString(PlayerDetails.RealName));
            player_coin.GetComponent <Text> ().text      = "0";
            // StartCoroutine(syncronized());
        } catch (System.Exception ex) {
            Debug.Log("Exception " + ex.Message);
        }
        this.SeeBtn.SetActive(false);
    }
    void Start()
    {
        base.Start();
        if (connectingScreen.activeSelf)
        {
            connectingScreen.SetActive(false);
        }
        JoinBtn.SetActive(false);
        try {
            base.player_Image.GetComponent <Image> ().sprite = Resources.Load <Sprite> ("Avtar/" + GameUser.CurrentUser.Pic);
        } catch (System.Exception ex) {
            // Debug.Log ("Exception " + ex.Message);
            base.player_Image.GetComponent <Image> ().sprite = Resources.Load <Sprite> ("user");
        }


        try {
            base.totalCoin.GetComponent <Text> ().text = (base.coin).ToString("F2");
        } catch (System.Exception ex) {
            // Debug.Log (ex.Message);
        }

        try {
            //statusMsg = transform.Find ("statusMsg").gameObject;
            //SeeBtn = transform.Find ("SeeBtn").gameObject;
            if (SeeBtn)
            {
                SeeBtn.SetActive(false);
            }
            //TipBtn = GameObject.Find ("Tipbutton");

            base.player_id = GameUser.CurrentUser.ID;
            //base.name = GameControllerTeenPatti.UppercaseFirst (PlayerPrefs.GetString (PlayerDetails.RealName));
            base.player_name.GetComponent <Text> ().text = GameControllerTeenPatti.UppercaseFirst(GameUser.CurrentUser.Name);
            player_coin.GetComponent <Text> ().text      = "0";
            // StartCoroutine(syncronized());
        } catch (System.Exception ex) {
            // Debug.Log ("Exception " + ex.Message);
        }
        this.SeeBtn.SetActive(false);
    }