mirror of
https://github.com/godotengine/godot-demo-projects.git
synced 2026-01-05 15:30:07 +01:00
164 lines
4.8 KiB
Plaintext
164 lines
4.8 KiB
Plaintext
[gd_scene load_steps=15 format=3 uid="uid://bqmku5ewlo6j5"]
|
|
|
|
[ext_resource type="Script" path="res://tests/functional/test_character.gd" id="1"]
|
|
[ext_resource type="PackedScene" uid="uid://blh3twy74kbkv" path="res://tests/test_options.tscn" id="3"]
|
|
[ext_resource type="Script" path="res://utils/slider.gd" id="3_cd5g0"]
|
|
[ext_resource type="PackedScene" uid="uid://cx2q80okt25o1" path="res://tests/static_scene_flat.tscn" id="4"]
|
|
[ext_resource type="Script" path="res://utils/label_slider_value.gd" id="4_eoplu"]
|
|
[ext_resource type="Script" path="res://utils/rigidbody_controller.gd" id="6"]
|
|
[ext_resource type="Script" path="res://utils/characterbody_controller.gd" id="7"]
|
|
|
|
[sub_resource type="CapsuleShape2D" id="3"]
|
|
radius = 15.0
|
|
height = 96.0
|
|
|
|
[sub_resource type="CircleShape2D" id="CircleShape2D_llvur"]
|
|
radius = 32.0
|
|
|
|
[sub_resource type="SeparationRayShape2D" id="RayShape2D_3lv1w"]
|
|
length = 64.0
|
|
|
|
[sub_resource type="PhysicsMaterial" id="1"]
|
|
friction = 0.0
|
|
|
|
[sub_resource type="CapsuleShape2D" id="2"]
|
|
radius = 15.0
|
|
height = 96.0
|
|
|
|
[sub_resource type="CircleShape2D" id="CircleShape2D_dr08f"]
|
|
radius = 32.0
|
|
|
|
[sub_resource type="SeparationRayShape2D" id="RayShape2D_w83f0"]
|
|
length = 64.0
|
|
|
|
[node name="Test" type="Node2D"]
|
|
script = ExtResource( "1" )
|
|
_snap_distance = 32.0
|
|
_floor_max_angle = 60.0
|
|
|
|
[node name="LabelTestType" type="Label" parent="."]
|
|
offset_left = 14.0
|
|
offset_top = 79.0
|
|
offset_right = 145.0
|
|
offset_bottom = 93.0
|
|
text = "Testing: "
|
|
__meta__ = {
|
|
"_edit_use_anchors_": false
|
|
}
|
|
|
|
[node name="Options" parent="." instance=ExtResource( "3" )]
|
|
|
|
[node name="LabelFloor" type="Label" parent="."]
|
|
offset_left = 14.0
|
|
offset_top = 237.929
|
|
offset_right = 145.0
|
|
offset_bottom = 251.929
|
|
text = "ON FLOOR"
|
|
__meta__ = {
|
|
"_edit_use_anchors_": false
|
|
}
|
|
|
|
[node name="LabelControls" type="Label" parent="."]
|
|
offset_left = 14.0
|
|
offset_top = 263.291
|
|
offset_right = 145.0
|
|
offset_bottom = 294.291
|
|
text = "LEFT/RIGHT - MOVE
|
|
UP - JUMP"
|
|
__meta__ = {
|
|
"_edit_use_anchors_": false
|
|
}
|
|
|
|
[node name="FloorMaxAngle" type="HBoxContainer" parent="."]
|
|
offset_left = 14.0
|
|
offset_top = 160.0
|
|
offset_right = 476.0
|
|
offset_bottom = 186.0
|
|
theme_override_constants/separation = 20
|
|
alignment = 2
|
|
__meta__ = {
|
|
"_edit_use_anchors_": false
|
|
}
|
|
|
|
[node name="Label" type="Label" parent="FloorMaxAngle"]
|
|
offset_right = 122.0
|
|
offset_bottom = 26.0
|
|
text = "Floor Max angle"
|
|
|
|
[node name="HSlider" type="HSlider" parent="FloorMaxAngle"]
|
|
offset_left = 142.0
|
|
offset_right = 342.0
|
|
offset_bottom = 16.0
|
|
rect_min_size = Vector2(200, 0)
|
|
max_value = 180.0
|
|
script = ExtResource( "3_cd5g0" )
|
|
snap_step = 5.0
|
|
|
|
[node name="LabelValue" type="Label" parent="FloorMaxAngle"]
|
|
offset_left = 362.0
|
|
offset_right = 462.0
|
|
offset_bottom = 26.0
|
|
rect_min_size = Vector2(100, 0)
|
|
text = "0.0"
|
|
script = ExtResource( "4_eoplu" )
|
|
|
|
[node name="CharacterBody2D" type="CharacterBody2D" parent="."]
|
|
position = Vector2(100, 450)
|
|
collision_mask = 2147483649
|
|
script = ExtResource( "7" )
|
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="CharacterBody2D"]
|
|
shape = SubResource( "3" )
|
|
|
|
[node name="CharacterBodyRay2D" type="CharacterBody2D" parent="."]
|
|
position = Vector2(100, 450)
|
|
collision_mask = 2147483649
|
|
script = ExtResource( "7" )
|
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="CharacterBodyRay2D"]
|
|
position = Vector2(0, -16)
|
|
shape = SubResource( "CircleShape2D_llvur" )
|
|
|
|
[node name="CollisionShapeRay2D" type="CollisionShape2D" parent="CharacterBodyRay2D"]
|
|
position = Vector2(0, -16)
|
|
shape = SubResource( "RayShape2D_3lv1w" )
|
|
|
|
[node name="RigidDynamicBody2D" type="RigidDynamicBody2D" parent="."]
|
|
position = Vector2(100, 450)
|
|
collision_mask = 2147483649
|
|
physics_material_override = SubResource( "1" )
|
|
contacts_reported = 4
|
|
contact_monitor = true
|
|
lock_rotation = true
|
|
script = ExtResource( "6" )
|
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="RigidDynamicBody2D"]
|
|
shape = SubResource( "2" )
|
|
|
|
[node name="RigidBodyRay2D" type="RigidDynamicBody2D" parent="."]
|
|
position = Vector2(100, 450)
|
|
collision_mask = 2147483649
|
|
physics_material_override = SubResource( "1" )
|
|
contacts_reported = 4
|
|
contact_monitor = true
|
|
lock_rotation = true
|
|
script = ExtResource( "6" )
|
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="RigidBodyRay2D"]
|
|
position = Vector2(-7.62939e-06, -16)
|
|
shape = SubResource( "CircleShape2D_dr08f" )
|
|
|
|
[node name="CollisionShapeRay2D" type="CollisionShape2D" parent="RigidBodyRay2D"]
|
|
position = Vector2(-7.62939e-06, -16)
|
|
shape = SubResource( "RayShape2D_w83f0" )
|
|
|
|
[node name="StaticSceneFlat" parent="." instance=ExtResource( "4" )]
|
|
position = Vector2(0, 12)
|
|
|
|
[node name="StaticBody2D" type="StaticBody2D" parent="."]
|
|
|
|
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="StaticBody2D"]
|
|
polygon = PackedVector2Array(171.04, 529.248, 379.275, 294.316, 506.084, 429.135, 648.26, 322.058, 868.746, 322.058, 985.282, 36.6919, 1242.91, 531.917)
|
|
|
|
[connection signal="value_changed" from="FloorMaxAngle/HSlider" to="." method="_update_floor_max_angle"]
|