public void Animate(AUIScrollViewContents contents, Action<Vector2> callback) { this.contents = contents; this.callback = callback; rectTransform = GetComponent<RectTransform>(); this.size = new Vector2(rectTransform.rect.width, rectTransform.rect.height); StartCoroutine(AnimCoroutine()); }
public void SetGameEvent(Fresvii.AppSteroid.Models.GameEvent gameEvent, AUIEvents auiEvents, AUIScrollViewContents contents, Action callback) { this.contents = contents; this.GameEvent = gameEvent; this.auiEvents = auiEvents; if (buttonCell != null) { buttonCell.gameObject.SetActive(auiEvents != null); } this.gameObject.SetActive(false); if (string.IsNullOrEmpty(GameEvent.ImageLargeUrl)) { FASLeaderboard.GetEvent(GameEvent.Id, (ge, error) => { if (error == null) { SetGameEvent(ge, auiEvents, this.contents, callback); SetLayout(); } }); } else { this.gameObject.SetActive(true); clipImage.Set(GameEvent.ImageLargeUrl); title.text = GameEvent.Name; duration.text = GameEvent.StartAt.ToLocalTime().ToString(FASText.Get("LocalDateTimeFormat")) + " - " + ((GameEvent.EndAt != System.DateTime.MaxValue) ? GameEvent.EndAt.ToLocalTime().ToString(FASText.Get("LocalDateTimeFormat")) : ""); description.text = GameEvent.Description; callback(); SetLayout(); } }