void StartShowAnimation() { LeanTween.cancel(gameObject); StopAllCoroutines(); transform.localScale = Vector3.zero; SetCurrentData(); UpdatePosition(); gameObject.SetActive(true); LeanTween.scale(gameObject, Vector3.one, animationDuration).setEase(animationEase).setOnComplete(() => { shown = true; ShownEvent?.Invoke(this); StartCurrentData(); }); }
private async Task OnAnimationEnd(string id) { BSModalEvent = new BSModalEvent() { Target = this }; if (id != MyRef.Id) { await new BlazorStrapInterop(JSRuntime).RemoveEventAnimationEnd(MyRef); if (IsOpen ?? false) { await ShownEvent.InvokeAsync(BSModalEvent).ConfigureAwait(false); } else { await HiddenEvent.InvokeAsync(BSModalEvent).ConfigureAwait(false); } _canShow = IsOpen ?? false; _drawing = false; await InvokeAsync(StateHasChanged).ConfigureAwait(false); } }
private void CourseView_Shown(object sender, EventArgs e) { ShownEvent?.Invoke(sender, e); }
private void StudentView_Shown(object sender, EventArgs e) { ShownEvent?.Invoke(sender, e); }
public virtual void Show() { gameObject.SetActive(true); ShownEvent?.Invoke(this); }
remove => RemoveHandler(ShownEvent, value);
add => AddHandler(ShownEvent, value);