예제 #1
0
 public void Init(Touch touch)
 {
     this.fingerID  = touch.fingerId;
     this.stateTime = touch.deltaTime;
     this.totalTime = touch.deltaTime;
     this.pos       = touch.position;
     this.deltaPos  = touch.deltaPosition;
     this.totalVec  = touch.deltaPosition;
     this.state     = TouchStateUtil.PhaseToState(touch.phase);
 }
예제 #2
0
        public void Update(Touch touch)
        {
            this.stateTime += touch.deltaTime;
            this.pos        = touch.position;
            this.deltaPos   = touch.deltaPosition;
            this.totalVec  += this.DeltaPos;
            this.totalTime += touch.deltaTime;

            TouchState state = TouchStateUtil.PhaseToState(touch.phase);

            if (this.state != state)
            {
                this.state     = state;
                this.stateTime = touch.deltaTime;
            }
        }