Esempio n. 1
0
    /// <summary>
    /// 设置url
    /// </summary>
    void SetUrl()
    {
        Debug.Log("平台类型:" + platformType.ToString());
        _urlDic.Add(UrlType.UploadScore_bought, hostUrl + "outer/intelligent/!expScoreSave");
        _urlDic.Add(UrlType.UploadReport_bought, hostUrl + "outer/report/!reportEdit");
#if UNITY_STANDALONE_WIN
        for (int i = 0; i < Host.Length - 1; i++)
        {
            host_simplePlatform += Host[i];
        }
        suffixSequenceUrl = "/openapi/" + id;
        _urlDic.Add(UrlType.Login_purchase, hostUrl + suffixTokenUrl);
        _urlDic.Add(UrlType.Login_simple, host_simplePlatform + suffixSequenceUrl);
        GetUserInfoOnCloudRender();
#elif UNITY_WEBGL
        if (platformType == PlatformType.Purchase)
        {
            if (Application.platform == RuntimePlatform.WebGLPlayer)
            {
                ExpInteractive.GetUserInfo();
            }
        }
#elif UNITY_WEBPLAYER
        if (platformType == PlatformType.Purchase)
        {
            if (Application.platform == RuntimePlatform.WindowsWebPlayer)
            {
                Application.ExternalCall("getUserInfoForWebPlayer");
            }
        }
#endif
    }
Esempio n. 2
0
 void Awake()
 {
     #region 单例
     if (_instance == null)
     {
         isOnly    = true;
         _instance = this;
         GetComponent <ExpReport>().Init();
         GetComponent <ExpScore>().Init();
         DontDestroyOnLoad(this);
     }
     if (!isOnly)
     {
         Destroy(gameObject);
     }
     #endregion
 }