Ejemplo n.º 1
0
        private ISDKTool GetSdkTool(EPlatformType type)
        {
            ISDKTool sdkTool = null;

            switch (Application.platform)
            {
            case RuntimePlatform.WindowsEditor:
            case RuntimePlatform.Android:
                Type sdkType = Type.GetType("AndroidSDKToolImpl");
                sdkTool = (ISDKTool)Activator.CreateInstance(sdkType);
                break;

            case RuntimePlatform.WindowsPlayer:
                Type toolType = typeof(WindowsSDKToolImpl);
                if (type == EPlatformType.Platform_Tencent)
                {
                    toolType = Type.GetType("WindowsTencensSDKToolImpl");
                }
                else if (type == EPlatformType.Platform_Baidu)
                {
                    toolType = Type.GetType("WindowsBaiduSDKToolImpl");
                }
                sdkTool = (ISDKTool)Activator.CreateInstance(toolType);
                break;
            }
            return(sdkTool);
        }
Ejemplo n.º 2
0
 public bool Init(ISDKTool sdktool)
 {
     if (null == sdktool)
     {
         return(false);
     }
     this.m_sdkToolImpl = sdktool;
     return(this.m_sdkToolImpl.Init());
 }
Ejemplo n.º 3
0
        public bool Init()
        {
            ISDKTool sdkTool = this.GetSdkTool(this.EPlatformType);

            if (null == sdkTool)
            {
                Debug.LogError("null == sdkTool");
                return(false);
            }
            return(SDKTool.Singleton.Init(sdkTool));
        }