public void UnregisterDisplay(ICardDisplay cardDisplay) { cardDisplay.SetImageSprite(null); DisplaysUsingImage.Remove(cardDisplay); if (DisplaysUsingImage.Count < 1) { ImageSprite = null; } }
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"); } } }