public RemotePromotion GetPromotion(string id, [Optional, DefaultParameterValue(0)] EPromotionType type) { if (!string.IsNullOrEmpty(id)) { for (int i = 0; i < Service.Binder.PromotionService.Promotions.Count; i++) { RemotePromotion promotion = Service.Binder.PromotionService.Promotions[i]; if (((type == EPromotionType.Unknown) || (promotion.PromotionType == type)) && (promotion.promotionid == id)) { return(promotion); } } } return(null); }
public void Show(EPromotionType promotionType) { this.promotionType = promotionType; panel.transform.localScale = Vector3.zero; this.gameObject.SetActive(true); Sequence sequence = DOTween.Sequence(); sequence.Insert(0.0f, panel.DOScale(Vector3.one * 1.02f, 0.2f)); sequence.Insert(0.0f, panel.DOLocalMove(new Vector3(0.0f, 0.0f), 0.2f)); sequence.Insert(0.2f, panel.DOScale(Vector3.one, 0.2f)); ShowPromotionPanel(); }