Exemplo n.º 1
0
    public void Down(PointerEventData eventData)
    {
        IsActive = true;
        SwiperTimer.Reset();
        SwiperTimer.Start();
        currentPointerID = eventData.pointerId;

        currPos       =
            lastPos   =
                start = GetCurrentPointerPosition();
    }
Exemplo n.º 2
0
    // Use this for initialization
    void Start()
    {
        if (DestoryObject)
        {
            timer = new ActionTimer(TimeToExpire, ExpireSelf);
        }
        else
        {
            timer = new ActionTimer(TimeToExpire, DisableSelf);
        }

        timer.Reset();
        timer.Start();
    }
Exemplo n.º 3
0
        /// <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;
            }
        }
Exemplo n.º 4
0
        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);
        }