otherworldly_simulation/scene/test/character.tscn

160 lines
4.7 KiB
Plaintext
Raw Permalink Normal View History

2024-11-01 23:23:07 +08:00
[gd_scene load_steps=17 format=3 uid="uid://cf2g2urxaukxb"]
2024-10-25 15:41:39 +08:00
[ext_resource type="Script" path="res://scene/test/self_character.gd" id="1_d0trv"]
[ext_resource type="Script" path="res://scene/test/state_machine.gd" id="2_v5m4x"]
[ext_resource type="Script" path="res://scene/test/idle.gd" id="3_gcdcj"]
[ext_resource type="Script" path="res://scene/test/run.gd" id="4_c7f2w"]
[ext_resource type="Texture2D" uid="uid://csk8u15wepd1w" path="res://icon.svg" id="5_lkgch"]
2024-10-25 17:45:08 +08:00
[ext_resource type="Script" path="res://scene/test/atk.gd" id="5_ol236"]
2024-10-25 15:41:39 +08:00
[sub_resource type="CircleShape2D" id="CircleShape2D_740ny"]
[sub_resource type="Animation" id="Animation_tov45"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("action_show:visible")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [false]
}
[sub_resource type="Animation" id="Animation_8eva7"]
resource_name = "show"
length = 0.5
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("action_show:visible")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.1, 0.5),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 1,
"values": [false, true, false]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_a6wya"]
_data = {
"RESET": SubResource("Animation_tov45"),
"show": SubResource("Animation_8eva7")
}
[sub_resource type="Gradient" id="Gradient_k76nm"]
colors = PackedColorArray(0, 0, 0, 1, 0, 0, 0, 1)
[sub_resource type="GradientTexture1D" id="GradientTexture1D_akajp"]
gradient = SubResource("Gradient_k76nm")
[sub_resource type="Gradient" id="Gradient_vdy2i"]
colors = PackedColorArray(0, 1, 0, 1, 0, 1, 0, 1)
[sub_resource type="GradientTexture1D" id="GradientTexture1D_jp0r7"]
gradient = SubResource("Gradient_vdy2i")
2024-10-30 19:54:45 +08:00
[sub_resource type="LabelSettings" id="LabelSettings_50aib"]
outline_size = 5
outline_color = Color(0, 0, 0, 1)
[sub_resource type="CircleShape2D" id="CircleShape2D_rhh7a"]
radius = 104.12
[node name="CharacterBody2D" type="CharacterBody2D" node_paths=PackedStringArray("agent", "state_machine", "rotate", "touch_area", "attack_area")]
2024-10-25 15:41:39 +08:00
script = ExtResource("1_d0trv")
2024-10-30 19:54:45 +08:00
unit_id = "player"
unit_type = "player"
2024-11-01 23:23:07 +08:00
unit_data_from_id = "test_character_ranged"
2024-10-25 15:41:39 +08:00
agent = NodePath("agent")
state_machine = NodePath("state_machine")
rotate = NodePath("rotate")
2024-10-30 19:54:45 +08:00
touch_area = NodePath("touch_area")
2024-11-01 23:23:07 +08:00
attack_area = NodePath("")
2024-10-25 15:41:39 +08:00
[node name="agent" type="NavigationAgent2D" parent="."]
path_postprocessing = 1
avoidance_enabled = true
radius = 20.0
debug_enabled = true
[node name="Camera2D" type="Camera2D" parent="."]
position_smoothing_enabled = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("CircleShape2D_740ny")
2024-10-28 19:24:10 +08:00
disabled = true
2024-10-25 15:41:39 +08:00
[node name="state_machine" type="Node" parent="."]
script = ExtResource("2_v5m4x")
init_state = NodePath("idle")
owner_player = NodePath("..")
[node name="idle" type="Node" parent="state_machine"]
script = ExtResource("3_gcdcj")
[node name="run" type="Node" parent="state_machine"]
script = ExtResource("4_c7f2w")
2024-10-25 17:45:08 +08:00
[node name="atk" type="Node" parent="state_machine"]
script = ExtResource("5_ol236")
2024-10-25 15:41:39 +08:00
[node name="rotate" type="Node2D" parent="."]
2024-11-01 23:23:07 +08:00
unique_name_in_owner = true
2024-10-25 15:41:39 +08:00
[node name="Sprite2D" type="Sprite2D" parent="."]
visible = false
texture = ExtResource("5_lkgch")
[node name="action_show" type="Label" parent="."]
unique_name_in_owner = true
visible = false
z_index = 1
offset_left = -40.0
offset_top = -75.0
offset_right = 39.0
offset_bottom = -6.0
theme_override_font_sizes/font_size = 50
text = "🤬"
horizontal_alignment = 1
vertical_alignment = 1
[node name="action_animation" type="AnimationPlayer" parent="."]
unique_name_in_owner = true
libraries = {
"": SubResource("AnimationLibrary_a6wya")
}
[node name="hp" type="TextureProgressBar" parent="."]
unique_name_in_owner = true
modulate = Color(1, 1, 1, 0.580392)
offset_left = -127.0
offset_top = -260.0
offset_right = 129.0
offset_bottom = -220.0
nine_patch_stretch = true
texture_under = SubResource("GradientTexture1D_akajp")
texture_progress = SubResource("GradientTexture1D_jp0r7")
2024-10-30 19:54:45 +08:00
[node name="door" type="Label" parent="."]
unique_name_in_owner = true
visible = false
offset_left = -13.0
offset_top = -133.0
offset_right = 27.0
offset_bottom = -110.0
text = "按e传送"
label_settings = SubResource("LabelSettings_50aib")
[node name="touch_area" type="Area2D" parent="."]
unique_name_in_owner = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="touch_area"]
shape = SubResource("CircleShape2D_rhh7a")
2024-10-25 15:41:39 +08:00
[connection signal="state_value_changed" from="." to="." method="_on_state_value_changed"]