예제 #1
0
 internal void HandleNewPacket(TouchPacket packet)
 {
     IsAvailable = packet.IsAvailable;
     for (int index = 0; index < TouchPacket.MaxNumberOfTouches; index++)
     {
         states[index] = packet.States[index];
         positions[index] = new Point(packet.Positions[index * 2], packet.Positions[index * 2 + 1]);
     }
 }
예제 #2
0
 internal static TouchPacket CreateTestPacket()
 {
     var packet = new TouchPacket { IsAvailable = true };
     packet.States[0] = State.JustPressed;
     packet.States[1] = State.Released;
     packet.Positions[8] = 0.5f;
     packet.Positions[9] = 0.3f;
     return packet;
 }
예제 #3
0
 private void AnalyseTouchPacket(TouchPacket packet)
 {
     if (packet != null && activeTouch != null)
         activeTouch.HandleNewPacket(packet);
 }