示例#1
0
        public static TGGameObject Instance()
        {
            if (instance == null)
            {
                GameObject go = new GameObject("TGSDK");
                go.hideFlags = HideFlags.HideAndDontSave;
                DontDestroyOnLoad(go);

                instance = go.AddComponent <TGGameObject>();
            }
            return(instance);
        }
示例#2
0
文件: TGSDK.cs 项目: Jyobeat/RunAway
 public static void Initialize()
 {
     if (init)
     {
         return;
     }
     TGGameObject.Instance();
     init = true;
     try {
         _TGSDK_initializeWithInfoPList();
     }
     catch (Exception e) {
         Debug.LogWarning(e);
     }
 }
示例#3
0
文件: TGSDK.cs 项目: Jyobeat/RunAway
 public static void Initialize(string appid, string channelid)
 {
     if (init)
     {
         return;
     }
     TGGameObject.Instance();
     init = true;
     try {
         _TGSDK_initializeWithChannel(appid, channelid);
     }
     catch (Exception e) {
         Debug.LogWarning(e);
     }
 }
示例#4
0
 public static void Initialize()
 {
     if (init)
     {
         return;
     }
     TGGameObject.Instance();
     init = true;
     try {
         _TGSDK_setScreenSize((double)Screen.width, (double)Screen.height);
         _TGSDK_initializeWithInfoPList();
     }
     catch (Exception e) {
         Debug.LogWarning(e);
     }
 }