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]); } }
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; }
private void AnalyseTouchPacket(TouchPacket packet) { if (packet != null && activeTouch != null) activeTouch.HandleNewPacket(packet); }