コード例 #1
0
    public void Down(PointerEventData eventData)
    {
        IsActive = true;
        SwiperTimer.Reset();
        SwiperTimer.Start();
        currentPointerID = eventData.pointerId;

        currPos       =
            lastPos   =
                start = GetCurrentPointerPosition();
    }
コード例 #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();
    }
コード例 #3
0
ファイル: TextInput.cs プロジェクト: rettoph/Guppy
        /// <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;
            }
        }
コード例 #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);
        }