Exemplo n.º 1
0
 public LTouchLocation(int aId, LTouchLocationState aState, float x, float y)
 {
     id               = aId;
     position         = new Vector2f(x, y);
     previousPosition = Vector2f.ZERO();
     state            = aState;
     previousState    = LTouchLocationState.Invalid;
     pressure         = 0.0f;
     previousPressure = 0.0f;
 }
Exemplo n.º 2
0
 public LTouchLocation(int aId, LTouchLocationState aState,
                       Vector2f aPosition, float aPressure)
 {
     id               = aId;
     position         = aPosition;
     previousPosition = Vector2f.ZERO();
     state            = aState;
     previousState    = LTouchLocationState.Invalid;
     pressure         = aPressure;
     previousPressure = 0.0f;
 }
Exemplo n.º 3
0
 public LTouchLocation(int aId, LTouchLocationState aState,
                       Vector2f aPosition, LTouchLocationState aPreviousState,
                       Vector2f aPreviousPosition)
 {
     id               = aId;
     position         = aPosition;
     previousPosition = aPreviousPosition;
     state            = aState;
     previousState    = aPreviousState;
     pressure         = 0.0f;
     previousPressure = 0.0f;
 }
Exemplo n.º 4
0
        public void Update(int id, LTouchLocationState state,
                           Vector2f position)
        {
            if (state == LTouchLocationState.Pressed)
            {
                throw new LSysException(
                          "Argument 'state' cannot be TouchLocationState.Pressed.");
            }

            for (int i = 0; i < Size(); i++)
            {
                if (this.Get(i).GetId() == id)
                {
                    LTouchLocation touchLocation = this.Get(i);
                    touchLocation.SetPosition(position);
                    touchLocation.SetState(state);
                    this.Set(i, touchLocation);
                    return;
                }
            }
            Clear();
        }
Exemplo n.º 5
0
 public void SetPrevState(LTouchLocationState value)
 {
     previousState = value;
 }