Example #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);
        }
Example #2
0
 public static void Initialize()
 {
     if (init)
     {
         return;
     }
     TGGameObject.Instance();
     init = true;
     try {
         _TGSDK_initializeWithInfoPList();
     }
     catch (Exception e) {
         Debug.LogWarning(e);
     }
 }
Example #3
0
 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);
     }
 }
Example #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);
     }
 }