[gd_scene load_steps=10 format=2] [ext_resource path="res://examples/example.tscn" type="PackedScene" id=1] [ext_resource path="res://examples/swipe-areas/swipe_areas_example.gd" type="Script" id=2] [ext_resource path="res://addons/swipe-detector/swipe_detector.gd" type="Script" id=3] [ext_resource path="res://addons/swipe-detector/icon.png" type="Texture" id=4] [ext_resource path="res://examples/resources/theme.tres" type="Theme" id=5] [ext_resource path="res://examples/resources/Trail.tscn" type="PackedScene" id=6] [ext_resource path="res://examples/resources/spot_green.png" type="Texture" id=7] [ext_resource path="res://examples/resources/spot_red.png" type="Texture" id=8] [sub_resource type="RectangleShape2D" id=1] custom_solver_bias = 0.0 extents = Vector2( 253, 313 ) [node name="SwipeAreasExample" instance=ExtResource( 1 )] script = ExtResource( 2 ) _sections_unfolded = [ "Pause" ] [node name="SwipeDetector" type="Node" parent="."] script = ExtResource( 3 ) __meta__ = { "_editor_icon": ExtResource( 4 ) } detect_gesture = true process_method = "Idle" distance_threshold = 0.01 duration_threshold = 0.05 limit_duration = false maximum_duration = -1.0 minimum_points = 2 limit_points = false maximum_points = -1 pattern_detection_score_threshold = 80 debug_mode = false [node name="Red" type="Area2D" parent="SwipeDetector"] input_pickable = true gravity_vec = Vector2( 0, 1 ) gravity = 98.0 linear_damp = 0.1 angular_damp = 1.0 audio_bus_override = false audio_bus_name = "Master" [node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="SwipeDetector/Red"] build_mode = 0 polygon = PoolVector2Array( 960, 0, 512, 0, 512, 640, 960, 640 ) _sections_unfolded = [ "Transform" ] [node name="Green" type="Area2D" parent="SwipeDetector"] input_pickable = true gravity_vec = Vector2( 0, 1 ) gravity = 98.0 linear_damp = 0.1 angular_damp = 1.0 audio_bus_override = false audio_bus_name = "Master" [node name="CollisionShape2D" type="CollisionShape2D" parent="SwipeDetector/Green"] position = Vector2( 256, 316 ) shape = SubResource( 1 ) _sections_unfolded = [ "Transform" ] [node name="Label1" type="Label" parent="."] modulate = Color( 0.909804, 0.290196, 0.372549, 1 ) anchor_left = 0.0 anchor_top = 0.0 anchor_right = 0.0 anchor_bottom = 0.0 margin_left = 672.0 margin_top = 297.0 margin_right = 824.0 margin_bottom = 348.0 rect_pivot_offset = Vector2( 0, 0 ) rect_clip_content = false mouse_filter = 2 size_flags_horizontal = 2 size_flags_vertical = 0 theme = ExtResource( 5 ) text = "Red Area" align = 1 percent_visible = 1.0 lines_skipped = 0 max_lines_visible = -1 _sections_unfolded = [ "Theme", "Visibility" ] [node name="Label2" type="Label" parent="."] modulate = Color( 0.6, 0.721569, 0.596078, 1 ) anchor_left = 0.0 anchor_top = 0.0 anchor_right = 0.0 anchor_bottom = 0.0 margin_left = 175.0 margin_top = 284.0 margin_right = 327.0 margin_bottom = 335.0 rect_pivot_offset = Vector2( 0, 0 ) rect_clip_content = false mouse_filter = 2 size_flags_horizontal = 2 size_flags_vertical = 0 theme = ExtResource( 5 ) text = "Green Area" align = 1 percent_visible = 1.0 lines_skipped = 0 max_lines_visible = -1 _sections_unfolded = [ "Material", "Theme", "Visibility" ] [node name="GreenTrail" parent="." instance=ExtResource( 6 )] texture = ExtResource( 7 ) [node name="RedTrail" parent="." instance=ExtResource( 6 )] texture = ExtResource( 8 ) [connection signal="swipe_ended" from="SwipeDetector" to="." method="_on_SwipeDetector_swipe_ended"] [connection signal="swipe_started" from="SwipeDetector" to="." method="_on_SwipeDetector_swipe_started"] [connection signal="swipe_updated" from="SwipeDetector" to="." method="_on_SwipeDetector_swipe_updated"]