Example #1
0
 public void UnregisterDisplay(ICardDisplay cardDisplay)
 {
     cardDisplay.SetImageSprite(null);
     DisplaysUsingImage.Remove(cardDisplay);
     if (DisplaysUsingImage.Count < 1)
     {
         ImageSprite = null;
     }
 }
Example #2
0
 public void RegisterDisplay(ICardDisplay cardDisplay)
 {
     DisplaysUsingImage.Add(cardDisplay);
     if (ImageSprite != null)
     {
         cardDisplay.SetImageSprite(ImageSprite);
     }
     else if (!IsLoadingImage)
     {
         if (SourceGame.CoroutineRunner != null)
         {
             SourceGame.CoroutineRunner.StartCoroutine(GetAndSetImageSprite());
         }
         else
         {
             UnityEngine.Debug.LogWarning("RegisterDisplay::NoImageOrImageLoader");
         }
     }
 }