コード例 #1
0
ファイル: UI.cs プロジェクト: Inh3ritance/Magnets
    void FixedUpdate()
    {
        if (startTime > 0)
        {
            //Creates Displayable Time
            time.text = "" + GameTime.DisplayableTime();
            if (time.text.Length >= 3 && time.text[time.text.Length - 2].Equals('.'))
            {
                time.text += "0";
            }
        }
        else if (!time.text.Equals(""))
        {
            time.text = time.text;
        }

        if (GooglePlay.signedIn && !playing && !leaderboards.gameObject.activeSelf && !GameData.data.isAmazon)
        {
            leaderboards.gameObject.SetActive(true);
            signInButton.gameObject.SetActive(false);
        }

        if (!GooglePlay.signedIn && !playing && leaderboards.gameObject.activeSelf && !GameData.data.isAmazon)
        {
            leaderboards.gameObject.SetActive(false);
            signInButton.gameObject.SetActive(true);
        }

        if (!Advertisement.IsReady("rewardedVideo") && adButton.gameObject.activeSelf)
        {
            adButton.interactable = false;
        }

        if (Advertisement.IsReady("rewardedVideo") && adButton.gameObject.activeSelf)
        {
            if (continued)
            {
                adButton.interactable = false;
            }
            else
            {
                adButton.interactable = true;
            }
        }
    }