mirror of
https://github.com/godotengine/godot-demo-projects.git
synced 2026-01-04 15:00:09 +01:00
150 lines
4.8 KiB
Plaintext
150 lines
4.8 KiB
Plaintext
[gd_scene load_steps=15 format=3 uid="uid://dcpy1a0rk8cb8"]
|
|
|
|
[ext_resource type="Script" uid="uid://cwi8jmbb33c0i" path="res://tests/functional/test_character.gd" id="1"]
|
|
[ext_resource type="PackedScene" uid="uid://cwjfkltvisc0n" path="res://tests/test_options.tscn" id="3"]
|
|
[ext_resource type="Script" uid="uid://05j0xhs6ygly" path="res://utils/slider.gd" id="3_cd5g0"]
|
|
[ext_resource type="PackedScene" uid="uid://bme1oft43530u" path="res://tests/static_scene_flat.tscn" id="4"]
|
|
[ext_resource type="Script" uid="uid://dyjwu6gqen7tq" path="res://utils/label_slider_value.gd" id="4_eoplu"]
|
|
[ext_resource type="Script" uid="uid://b0jkxylp22kyw" path="res://utils/rigidbody_controller.gd" id="6"]
|
|
[ext_resource type="Script" uid="uid://biq27skoujiho" 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: "
|
|
|
|
[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"
|
|
|
|
[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"
|
|
|
|
[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
|
|
|
|
[node name="Label" type="Label" parent="FloorMaxAngle"]
|
|
layout_mode = 2
|
|
text = "Floor Max angle"
|
|
|
|
[node name="HSlider" type="HSlider" parent="FloorMaxAngle"]
|
|
layout_mode = 2
|
|
size_flags_horizontal = 3
|
|
max_value = 180.0
|
|
script = ExtResource("3_cd5g0")
|
|
snap_step = 5.0
|
|
|
|
[node name="LabelValue" type="Label" parent="FloorMaxAngle"]
|
|
layout_mode = 2
|
|
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")
|
|
debug_color = Color(0, 1, 0, 0.0980392)
|
|
|
|
[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")
|
|
debug_color = Color(0, 1, 0, 0.0980392)
|
|
|
|
[node name="CollisionShapeRay2D" type="CollisionShape2D" parent="CharacterBodyRay2D"]
|
|
position = Vector2(0, -16)
|
|
shape = SubResource("RayShape2D_3lv1w")
|
|
debug_color = Color(0, 1, 0, 0.0980392)
|
|
|
|
[node name="RigidDynamicBody2D" type="RigidBody2D" parent="."]
|
|
position = Vector2(100, 450)
|
|
collision_mask = 2147483649
|
|
physics_material_override = SubResource("1")
|
|
lock_rotation = true
|
|
contact_monitor = true
|
|
script = ExtResource("6")
|
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="RigidDynamicBody2D"]
|
|
shape = SubResource("2")
|
|
debug_color = Color(1, 1, 0, 0.0980392)
|
|
|
|
[node name="RigidBodyRay2D" type="RigidBody2D" parent="."]
|
|
position = Vector2(100, 450)
|
|
collision_mask = 2147483649
|
|
physics_material_override = SubResource("1")
|
|
lock_rotation = true
|
|
contact_monitor = true
|
|
script = ExtResource("6")
|
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="RigidBodyRay2D"]
|
|
position = Vector2(-7.62939e-06, -16)
|
|
shape = SubResource("CircleShape2D_dr08f")
|
|
debug_color = Color(1, 1, 0, 0.0980392)
|
|
|
|
[node name="CollisionShapeRay2D" type="CollisionShape2D" parent="RigidBodyRay2D"]
|
|
position = Vector2(-7.62939e-06, -16)
|
|
shape = SubResource("RayShape2D_w83f0")
|
|
debug_color = Color(1, 1, 0, 0.0980392)
|
|
|
|
[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"]
|