private void IsGiftAvailable(OnGiftAvailable e) { _isGiftAvailable = e.IsAvailable; if (!_isGiftAvailable || !isVisual || _activeNamesList.IndexOf("NotifyGiftWaiting") == -1) { return; } AddNoifyGift(); int idNotifyOld = _activeNamesList.IndexOf("NotifyGiftWaiting"); if (idNotifyOld != -1) { var element = GetUIElement(_activeNamesList[idNotifyOld]); UIManager.HideUiElement(_activeNamesList[idNotifyOld]); var element2 = GetUIElement("NotifyGift"); if (element) { element2.customStartAnchoredPosition = element.customStartAnchoredPosition; element2.useCustomStartAnchoredPosition = true; } _activeNamesList.RemoveAt(idNotifyOld); } UIManager.ShowUiElement("NotifyGift"); }
private void IsGiftAvailable(OnGiftAvailable e) { _isGiftAvailable = e.isAvailable; if (!e.isAvailable) { UIManager.HideUiElement("NotifyGift"); } }