Beispiel #1
0
 public void SNSButtonOnClick()
 {
     if (Application.platform == RuntimePlatform.IPhonePlayer || Application.platform == RuntimePlatform.Android)
     {
         if (KTPlay.IsEnabled())
         {
             KTPlay.Show();
         }
     }
     GameSoundSystem.GetInstance().PlayRandomSound();
 }
Beispiel #2
0
 public void LoginButtonOnClick()
 {
     if (Application.platform == RuntimePlatform.IPhonePlayer || Application.platform == RuntimePlatform.Android)
     {
         if (KTPlay.IsEnabled())
         {
             KTAccountManager.ShowLoginView(true, this, OnKTPlayLoginFinish);
         }
     }
     GameSoundSystem.GetInstance().PlayRandomSound();
 }
Beispiel #3
0
    public bool IsSNSAvailable()
    {
        string appVersion = GetAPPVersion();

                #if UNITY_IPHONE || UNITY_ANDROID
        string currentVersionSNSActiveKey = "sns_switch_" + appVersion;

        string SNSActiveState = GA.GetConfigParamForKey(currentVersionSNSActiveKey);
                #else
        string SNSActiveState = "0";
                #endif
        bool available = (Application.platform == RuntimePlatform.IPhonePlayer || Application.platform == RuntimePlatform.Android) &&
                         (string.IsNullOrEmpty(SNSActiveState) || SNSActiveState == "1") &&
                         LocalVersion.local == LocalVersion.Local.CN_ZH &&
                         KTPlay.IsEnabled();
        Debug.Log(string.Format("SNS state is {0}! version:{1} online param:{2}", available?"on":"off", appVersion, SNSActiveState));
        return(available);
    }
Beispiel #4
0
    public void RefreshRankButton()
    {
        bool needShowRankButton = (LocalVersion.local == LocalVersion.Local.CN_ZH);

        if (Application.platform == RuntimePlatform.IPhonePlayer || Application.platform == RuntimePlatform.Android)
        {
            needShowRankButton = needShowRankButton && KTPlay.IsEnabled();
        }

        int index = 0;

        foreach (GameObject rankButton in rankButtons)
        {
            if (mode == GameSystem.Mode.Dual)
            {
                rankButton.SetActive(false);
            }
            else
            {
                if ((mode == GameSystem.Mode.BlackJack || mode == GameSystem.Mode.Word) && index != 0)
                {
                    rankButton.SetActive(false);
                }
                else
                {
                    rankButton.SetActive(needShowRankButton);
                }
            }
            index++;
        }

        if (LocalVersion.local == LocalVersion.Local.EN)
        {
            for (int i = 0; i < rankButtons.Length; i++)
            {
                Vector3 rankButtonPos      = rankButtons[i].transform.localPosition;
                Vector3 bestRecordLabelPos = bestRecordLabels[i].transform.localPosition;
                bestRecordLabelPos.y = rankButtonPos.y;
                bestRecordLabels[i].transform.localPosition = bestRecordLabelPos;
            }
        }
    }