public void Down(PointerEventData eventData) { IsActive = true; SwiperTimer.Reset(); SwiperTimer.Start(); currentPointerID = eventData.pointerId; currPos = lastPos = start = GetCurrentPointerPosition(); }
// Use this for initialization void Start() { if (DestoryObject) { timer = new ActionTimer(TimeToExpire, ExpireSelf); } else { timer = new ActionTimer(TimeToExpire, DisableSelf); } timer.Reset(); timer.Start(); }
/// <summary> /// Handle the element focused state changed event. /// </summary> /// <param name="sender"></param> /// <param name="which"></param> /// <param name="value"></param> private void HandleFocused(IElement sender, ElementState which, bool value) { if (value) { _window.TextInput += this.HandleTextInput; this.OnDraw += this.DrawCarret; _renderCarret = false; _carretTimer.Reset(); } else { _window.TextInput -= this.HandleTextInput; this.OnDraw -= this.DrawCarret; } }
public void StartTransition() { var from = GetScreenByName(TransitioningOut); var to = GetScreenByName(TransitioningIn); TransitionTimer.TimeLimit = TransitionDuration; TransitionTimer.Reset(); TransitionTimer.Start(); //to.rotation = Quaternion.identity; to.gameObject.SetActive(true); toStart = CurrentTransitionIsBack ? new Vector2(-Screen.width, 0) : new Vector2(Screen.width, 0); toEnd = new Vector2(0, 0); to.anchoredPosition = toStart; toRotate = CurrentTransitionIsBack ? rotateLeft : rotateRight; fromRotate = !CurrentTransitionIsBack ? rotateLeft : rotateRight; fromStart = new Vector2(0, 0); fromEnd = CurrentTransitionIsBack ? new Vector2(Screen.width, 0) : new Vector2(-Screen.width, 0); }