예제 #1
0
        public IPsdkSplash                                      GetSplashService()
        {
            if (!isPsdkValid())
            {
                return(null);
            }

            if (null != _splashService)
            {
                return(_splashService);
            }

            _splashService = GettingServiceByReflection <IPsdkSplash>("PsdkSplashService");

            if (null != _splashService)
            {
                return(_splashService);
            }

            if (!_silent)
            {
                Debug.Log("Please import Splash.unitypackage before SetupSplash !");
            }
            return(null);
        }
예제 #2
0
        public bool SetupSplash()
        {
            registerInternalService(_splashService = GetSplashService());
            if (null != _splashService)
            {
                return(_splashService.SetupSplash());
            }

            return(false);
        }
예제 #3
0
        bool isSplashServiceEnabled()
        {
            IPsdkSplash splash = _sm.GetSplashService();

            if (splash == null)
            {
                return(false);
            }


            IDictionary <string, object> psdkConfig = TabTale.Plugins.PSDK.Json.Deserialize(_sm.ConfigJson) as IDictionary <string, object>;

            if (psdkConfig == null)
            {
                return(false);
            }

            if (!psdkConfig.ContainsKey("splash"))
            {
                return(false);
            }

            IDictionary <string, object> psdkContent = psdkConfig ["splash"] as IDictionary <string, object>;

            if (psdkContent == null)
            {
                return(false);
            }

            object obj;

            if (psdkContent.TryGetValue("enabled", out obj))
            {
                string enabledValue = obj as string;
                if (enabledValue.ToLower() == "yes")
                {
                    return(true);
                }
            }

            return(false);
        }