Beispiel #1
0
    public void ShowContent()
    {
        StopCoroutine("HidingText");
        StopCoroutine("ShowingText");
//		MoreButton.GetComponent<ReadMoreButton>().SetButtonEnable(true);
        WebButton.GetComponent <WebViewButton>().SetButtonEnable(true);

        if (this.gameObject.activeInHierarchy)
        {
            StartCoroutine("ShowingText");
        }
        else
        {
//			TitleText.gameObject.SetActive(true);
            TitleText.color = TitleTextColor;

            DetailText.color = DetailTextColor;
            MoreButton.GetComponent <SpriteRenderer>().color = new Color32(255, 255, 255, 255);
            WebButton.GetComponent <SpriteRenderer>().color  = new Color32(255, 255, 255, 255);
        }
    }
Beispiel #2
0
    public void SetRankItem(int idx, float Height, RankingData _data, int gameId, int rank)
    {
        data      = _data;
        Name.text = _data.user_name;
        if (rank == 1)
        {
            RankText.SetActive(false);
            RankIcon.gameObject.SetActive(true);
            RankIcon.sprite = Rank1;
        }
        else if (rank == 2)
        {
            RankText.SetActive(false);
            RankIcon.gameObject.SetActive(true);
            RankIcon.sprite = Rank2;
        }
        else if (rank == 3)
        {
            RankText.SetActive(false);
            RankIcon.gameObject.SetActive(true);
            RankIcon.sprite = Rank3;
        }
        else
        {
            RankText.SetActive(true);
            RankIcon.gameObject.SetActive(false);
        }
        RankNumber.text = rank.ToString();
        switch (gameId)
        {
        case 0:
            //all
            Score.text = _data.scoreAll.ToString("#,##0");
            break;

        case 1:
            Score.text = _data.score[0].ToString("#,##0");
            break;

        case 2:
            Score.text = _data.score[1].ToString("#,##0");
            break;

        case 3:
            Score.text = _data.score[2].ToString("#,##0");
            break;

        case 4:
            Score.text = _data.score[3].ToString("#,##0");
            break;

        case 5:
            Score.text = _data.score[4].ToString("#,##0");
            break;

        case 6:
            Score.text = _data.score[5].ToString("#,##0");
            break;
        }
        //check if Gift is avaliable
        giftCD = GiftSentGlobal.getGift(data.userId);
        if ((giftCD != null) && (GiftSentGlobal.CalculateCountDownTick(giftCD) > 0))
        {
            //start countdown Routine
            StartCountDown();
        }
        else
        {
            //enable sent gift
            SendGiftButton.enabled = true;
            SendGiftButton.GetComponent <SpriteRenderer>().color = new Color(1.0f, 1.0f, 1.0f, 1.0f);
            CountDown.gameObject.SetActive(false);
        }
        transform.localPosition = new Vector3(0, idx * -Height, 0);
    }