Example #1
0
        /// <summary>
        /// Run Game Service.
        /// </summary>
        /// <param name="connected">(Not NULL)this Listener Called When Game Service Connected Successfully</param>
        /// <param name="onError">(Not NULL)this Listener Called When Game Service Initialize With Problem</param>
        public static void Run(Action connected, Action <string> onError)
        {
            if (Configuration == null)
            {
                LogUtil.LogError(Tag, "Configuration Not Set, Do Nothing..");
                return;
            }

            _actions = new Pair <Action, Action <string> >(connected, onError);

            if (Instance != null)
            {
                if (Configuration.EnableLog)
                {
                    LogUtil.LogWarning(Tag, "GameService Initialized Before , Do Nothing..");
                }
                return;
            }

            if (Configuration.DownloadTag != null)
            {
                GameServiceDownloadInitializer.DownloadData(Configuration, DownloadListener, DownloadErrorListener);
            }
            else
            {
                GameServiceAppInitializer.Init(Configuration, OnSuccessInit, OnErrorInit);
            }
        }
 /// <summary>
 /// Download Asset With Tag
 /// </summary>
 /// <param name="tag">(Not NULL)Specifies the Asset tag that Set in Developers Panel.</param>
 /// <param name="callback">(Not NULL)Return Asset File Path When Downloaded</param>
 /// <param name="error">(Not NULL)Return Error When Error Happened</param>
 public static void DownloadAsset(string tag, Action <string> callback, Action <string> error)
 {
     GameServiceDownloadInitializer.DownloadAsset(tag, Configuration, callback, error);
 }