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); }
public bool Init(ISDKTool sdktool) { if (null == sdktool) { return(false); } this.m_sdkToolImpl = sdktool; return(this.m_sdkToolImpl.Init()); }
public bool Init() { ISDKTool sdkTool = this.GetSdkTool(this.EPlatformType); if (null == sdkTool) { Debug.LogError("null == sdkTool"); return(false); } return(SDKTool.Singleton.Init(sdkTool)); }