您不能選擇超過 %s 個話題 話題必須以字母或數字為開頭,可包含連接號 ('-') 且最長為 35 個字

36 行
1.0 KiB

  1. require("preload.Plugin")
  2. function initPluginBugly()
  3. print("initPluginBugly()")
  4. local romSetting = loadRomSettingScript()
  5. if romSetting and romSetting.ChannelId == 105 then
  6. print("initPluginBugly(), return by channelid == 105")
  7. return
  8. end
  9. local PluginConfig = require("preload.PluginConfig")
  10. local targetPlatform = cc.Application:getInstance():getTargetPlatform();
  11. local plugin = nil
  12. local pluginParams = nil
  13. if targetPlatform == 3 then
  14. plugin = cc.PluginManager:getInstance():createPlugin("PluginBugly" , "com/ddgame/plugin/PluginBugly");
  15. pluginParams = {
  16. AppId = PluginConfig.Bugly.appIdAndroid,
  17. AppKey = PluginConfig.Bugly.appKeyAndroid,
  18. isDebug = false,
  19. }
  20. elseif targetPlatform == 4 or targetPlatform == 5 then
  21. plugin = cc.PluginManager:getInstance():createPlugin("PluginBugly" , "PluginBugly");
  22. pluginParams = {
  23. AppId = PluginConfig.Bugly.appIdIos,
  24. AppKey = PluginConfig.Bugly.appKeyIos,
  25. isDebug = false,
  26. };
  27. end
  28. if plugin and pluginParams then
  29. plugin:callVoid("initPlugin", pluginParams);
  30. end
  31. end