private void Init() { canvasGroup = RawObject.AddComponent <CanvasGroup>(); notificationList = CreateChild <NotificationList>("notification-list"); { notificationList.Anchor = AnchorType.Fill; notificationList.Offset = Offset.Zero; notificationList.Scope = NotificationScope.Temporary; notificationList.OnDismiss += OnDismissed; } showAni = new Anime(); showAni.AddEvent(0f, () => Active = true); showAni.AnimateFloat(a => canvasGroup.alpha = a) .AddTime(0f, () => canvasGroup.alpha) .AddTime(0.25f, 1f) .Build(); hideAni = new Anime(); hideAni.AnimateFloat(a => canvasGroup.alpha = a) .AddTime(0f, () => canvasGroup.alpha) .AddTime(0.25f, 1f) .Build(); hideAni.AddEvent(hideAni.Duration, () => Active = false); OnEnableInited(); }
private void Init() { cellRecycler = new ManagedRecycler <NotificationCell>(CreateCell); canvasGroup = RawObject.AddComponent <CanvasGroup>(); }