123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245 |
- [gd_scene load_steps=9 format=2]
- [ext_resource path="res://tests/functional/test_one_way_collision.gd" type="Script" id=1]
- [ext_resource path="res://icon.png" type="Texture" id=2]
- [ext_resource path="res://tests/test_options.tscn" type="PackedScene" id=3]
- [ext_resource path="res://utils/label_slider_value.gd" type="Script" id=4]
- [ext_resource path="res://utils/slider.gd" type="Script" id=5]
- [sub_resource type="RectangleShape2D" id=1]
- extents = Vector2( 32, 32 )
- [sub_resource type="RectangleShape2D" id=2]
- extents = Vector2( 64, 32 )
- [sub_resource type="RectangleShape2D" id=3]
- extents = Vector2( 32, 32 )
- [node name="Test" type="Node2D"]
- script = ExtResource( 1 )
- [node name="LabelTestType" type="Label" parent="."]
- margin_left = 14.0
- margin_top = 79.0
- margin_right = 145.0
- margin_bottom = 93.0
- text = "Testing: "
- __meta__ = {
- "_edit_use_anchors_": false
- }
- [node name="Options" parent="." instance=ExtResource( 3 )]
- [node name="Controls" type="VBoxContainer" parent="."]
- pause_mode = 2
- anchor_right = 1.0
- anchor_bottom = 1.0
- margin_left = 25.3619
- margin_top = 416.765
- margin_right = 265.362
- margin_bottom = 484.765
- custom_constants/separation = 10
- __meta__ = {
- "_edit_use_anchors_": false
- }
- [node name="PlatformSize" type="HBoxContainer" parent="Controls"]
- margin_right = 432.0
- margin_bottom = 16.0
- custom_constants/separation = 20
- alignment = 2
- __meta__ = {
- "_edit_use_anchors_": false
- }
- [node name="Label" type="Label" parent="Controls/PlatformSize"]
- margin_left = 8.0
- margin_top = 1.0
- margin_right = 92.0
- margin_bottom = 15.0
- text = "Platform size"
- [node name="HSlider" type="HSlider" parent="Controls/PlatformSize"]
- margin_left = 112.0
- margin_right = 312.0
- margin_bottom = 16.0
- rect_min_size = Vector2( 200, 0 )
- min_value = 32.0
- max_value = 128.0
- value = 64.0
- script = ExtResource( 5 )
- [node name="LabelValue" type="Label" parent="Controls/PlatformSize"]
- margin_left = 332.0
- margin_top = 1.0
- margin_right = 432.0
- margin_bottom = 15.0
- rect_min_size = Vector2( 100, 0 )
- text = "64.0"
- script = ExtResource( 4 )
- [node name="PlatformAngle" type="HBoxContainer" parent="Controls"]
- margin_top = 26.0
- margin_right = 432.0
- margin_bottom = 42.0
- custom_constants/separation = 20
- alignment = 2
- __meta__ = {
- "_edit_use_anchors_": false
- }
- [node name="Label" type="Label" parent="Controls/PlatformAngle"]
- margin_top = 1.0
- margin_right = 92.0
- margin_bottom = 15.0
- text = "Platform angle"
- [node name="HSlider" type="HSlider" parent="Controls/PlatformAngle"]
- margin_left = 112.0
- margin_right = 312.0
- margin_bottom = 16.0
- rect_min_size = Vector2( 200, 0 )
- max_value = 360.0
- script = ExtResource( 5 )
- snap_step = 5.0
- [node name="LabelValue" type="Label" parent="Controls/PlatformAngle"]
- margin_left = 332.0
- margin_top = 1.0
- margin_right = 432.0
- margin_bottom = 15.0
- rect_min_size = Vector2( 100, 0 )
- text = "0.0"
- script = ExtResource( 4 )
- [node name="BodyAngle" type="HBoxContainer" parent="Controls"]
- margin_top = 52.0
- margin_right = 432.0
- margin_bottom = 68.0
- custom_constants/separation = 20
- alignment = 2
- __meta__ = {
- "_edit_use_anchors_": false
- }
- [node name="Label" type="Label" parent="Controls/BodyAngle"]
- margin_left = 22.0
- margin_top = 1.0
- margin_right = 92.0
- margin_bottom = 15.0
- text = "Body angle"
- [node name="HSlider" type="HSlider" parent="Controls/BodyAngle"]
- margin_left = 112.0
- margin_right = 312.0
- margin_bottom = 16.0
- rect_min_size = Vector2( 200, 0 )
- max_value = 360.0
- script = ExtResource( 5 )
- snap_step = 5.0
- [node name="LabelValue" type="Label" parent="Controls/BodyAngle"]
- margin_left = 332.0
- margin_top = 1.0
- margin_right = 432.0
- margin_bottom = 15.0
- rect_min_size = Vector2( 100, 0 )
- text = "0.0"
- script = ExtResource( 4 )
- [node name="LabelResultTitle" type="Label" parent="."]
- anchor_left = 0.5
- anchor_top = 0.5
- anchor_right = 0.5
- anchor_bottom = 0.5
- margin_left = 34.1273
- margin_top = 251.131
- margin_right = 88.1273
- margin_bottom = 265.131
- text = "RESULT: "
- align = 1
- valign = 1
- __meta__ = {
- "_edit_use_anchors_": false
- }
- [node name="LabelResult" type="Label" parent="."]
- anchor_left = 0.5
- anchor_top = 0.5
- anchor_right = 0.5
- anchor_bottom = 0.5
- margin_left = 34.1273
- margin_top = 266.131
- margin_right = 88.1273
- margin_bottom = 280.131
- text = "..."
- align = 1
- valign = 1
- __meta__ = {
- "_edit_use_anchors_": false
- }
- [node name="LabelRestart" type="Label" parent="."]
- anchor_left = 0.5
- anchor_top = 0.5
- anchor_right = 0.5
- anchor_bottom = 0.5
- margin_left = 34.1273
- margin_top = 304.841
- margin_right = 139.127
- margin_bottom = 318.841
- text = "SPACE - RESTART"
- align = 1
- valign = 1
- __meta__ = {
- "_edit_use_anchors_": false
- }
- [node name="Timer" type="Timer" parent="."]
- wait_time = 5.0
- one_shot = true
- [node name="TargetArea2D" type="Area2D" parent="."]
- position = Vector2( 724, 300 )
- [node name="CollisionShape2D" type="CollisionShape2D" parent="TargetArea2D"]
- shape = SubResource( 1 )
- [node name="OneWayKinematicBody2D" type="KinematicBody2D" parent="."]
- position = Vector2( 512, 300 )
- [node name="CollisionShape2D" type="CollisionShape2D" parent="OneWayKinematicBody2D"]
- shape = SubResource( 2 )
- one_way_collision = true
- [node name="RigidBody2D" type="RigidBody2D" parent="."]
- position = Vector2( 300, 300 )
- collision_mask = 2147483649
- gravity_scale = 0.0
- contacts_reported = 1
- contact_monitor = true
- [node name="Sprite" type="Sprite" parent="RigidBody2D"]
- self_modulate = Color( 1, 1, 1, 0.501961 )
- scale = Vector2( 0.5, 0.5 )
- texture = ExtResource( 2 )
- [node name="CollisionShape2D" type="CollisionShape2D" parent="RigidBody2D"]
- shape = SubResource( 3 )
- [node name="KinematicBody2D" type="KinematicBody2D" parent="."]
- position = Vector2( 300, 300 )
- collision_mask = 2147483649
- [node name="Sprite" type="Sprite" parent="KinematicBody2D"]
- self_modulate = Color( 1, 1, 1, 0.501961 )
- scale = Vector2( 0.5, 0.5 )
- texture = ExtResource( 2 )
- [node name="CollisionShape2D" type="CollisionShape2D" parent="KinematicBody2D"]
- shape = SubResource( 3 )
- [connection signal="value_changed" from="Controls/PlatformSize/HSlider" to="." method="_set_platform_size"]
- [connection signal="value_changed" from="Controls/PlatformAngle/HSlider" to="." method="_set_platform_angle"]
- [connection signal="value_changed" from="Controls/BodyAngle/HSlider" to="." method="_set_rigidbody_angle"]
|