using System; using System.Collections.Generic; using Guru; namespace GuruSDKService { public partial class GuruSDKService : Singleton { private bool _initService; private IGuruSDKServiceImp _serviceImp; public void InitService(IGuruSDKServiceImp serviceImp, Action onFirebaseReady) { if(_initService) return; _initService = true; _serviceImp = serviceImp; _onFirebaseReady = onFirebaseReady; InitSDKModel(); AddCallbackListener(); AddIAPCallbackListener(); Guru.Analytics.EnableTch02Event = true; GuruSDKInitConfig config = new GuruSDKInitConfig { UseCustomConsent = false, AutoLoadWhenAdsReady = true, AutoRecordFinishedLevels = true, IsBuyNoAds = _serviceImp.IsNoAD, CustomServiceKey = _serviceImp.CustomServiceKey, BannerBackgroundColor = _serviceImp.BannerBackgroundColor, IAPEnabled = _serviceImp.IsIAPEnabled, DebugMode = _serviceImp.IsDebugMode, DefaultRemoteData = _serviceImp.GetDefaultRemoteData(), GoogleKeys = _serviceImp.GetGooglePlayTangleData(), AppleRootCerts = _serviceImp.GetAppleTangleData() }; GuruSDK.Init(config, null); } } }