Beispiel #1
0
 public virtual void SaveObjects()
 {
     if (storage != null)
     {
         storage.PutObjects(this, (s, e) =>
         {
             if (!s)
             {
                 onSaveException.errorMsg.Value = e == null ? "" : e.Message;
                 if (onSaveException.node != null)
                 {
                     onSaveException.node.Execute();
                 }
                 Debug.LogWarning(e);
             }
             else
             {
                 if (onSaveCompleted != null)
                 {
                     onSaveCompleted.Execute();
                 }
             }
         }, (p) =>
         {
             progress.Value = p;
         }, FindObjects());
     }
 }
Beispiel #2
0
        protected override void Run()
        {
            ShowOptions o = new ShowOptions();

            o.resultCallback = (s) =>
            {
                if (s == ShowResult.Finished)
                {
                    success.Execute();
                }
                if (s == ShowResult.Failed)
                {
                    fail.Execute();
                }
                else if (s == ShowResult.Skipped)
                {
                    skip.Execute();
                }
            };
            Advertisement.Show(placementId.Value, o);
        }