[gd_scene load_steps=14 format=3 uid="uid://dl1axae8yeeeh"] [ext_resource type="Script" path="res://scene/test/other_character.gd" id="1_6f8fy"] [ext_resource type="Texture2D" uid="uid://csk8u15wepd1w" path="res://icon.svg" id="2_tbr4x"] [ext_resource type="PackedScene" uid="uid://dirg8ytcjol3c" path="res://scene/behavour_tree/base/base_behaviour_tree.tscn" id="3_5u10o"] [sub_resource type="CircleShape2D" id="CircleShape2D_s46hi"] [sub_resource type="CircleShape2D" id="CircleShape2D_fp36j"] radius = 104.12 [sub_resource type="CircleShape2D" id="CircleShape2D_0d77h"] radius = 847.191 [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_uhodq"] colors = PackedColorArray(0, 0, 0, 1, 0, 0, 0, 1) [sub_resource type="GradientTexture1D" id="GradientTexture1D_ioncu"] gradient = SubResource("Gradient_uhodq") [sub_resource type="Gradient" id="Gradient_qd3pc"] colors = PackedColorArray(0, 1, 0, 1, 0, 1, 0, 1) [sub_resource type="GradientTexture1D" id="GradientTexture1D_6t72h"] gradient = SubResource("Gradient_qd3pc") [node name="other_character" type="CharacterBody2D" node_paths=PackedStringArray("agent", "rotate", "touch_area", "sense_area")] script = ExtResource("1_6f8fy") agent = NodePath("agent") rotate = NodePath("rotate") touch_area = NodePath("touch_area") sense_area = NodePath("sense_area") [node name="Sprite2D" type="Sprite2D" parent="."] visible = false texture = ExtResource("2_tbr4x") [node name="agent" type="NavigationAgent2D" parent="."] path_postprocessing = 1 avoidance_enabled = true radius = 20.0 debug_enabled = true [node name="CollisionShape2D" type="CollisionShape2D" parent="."] shape = SubResource("CircleShape2D_s46hi") [node name="rotate" type="Node2D" parent="."] unique_name_in_owner = true [node name="touch_area" type="Area2D" parent="."] unique_name_in_owner = true [node name="CollisionShape2D" type="CollisionShape2D" parent="touch_area"] shape = SubResource("CircleShape2D_fp36j") [node name="sense_area" type="Area2D" parent="."] unique_name_in_owner = true [node name="CollisionShape2D" type="CollisionShape2D" parent="sense_area"] shape = SubResource("CircleShape2D_0d77h") [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="hungry" type="Label" parent="."] unique_name_in_owner = true offset_left = -56.0 offset_top = -179.0 offset_right = 48.0 offset_bottom = -96.0 theme_override_colors/font_color = Color(0, 0, 0, 1) theme_override_font_sizes/font_size = 20 horizontal_alignment = 1 vertical_alignment = 1 [node name="hp" type="TextureProgressBar" parent="."] unique_name_in_owner = true modulate = Color(1, 1, 1, 0.607843) offset_left = -128.0 offset_top = -192.0 offset_right = 128.0 offset_bottom = -152.0 nine_patch_stretch = true texture_under = SubResource("GradientTexture1D_ioncu") texture_progress = SubResource("GradientTexture1D_6t72h") [node name="BeehaveTree" parent="." node_paths=PackedStringArray("blackboard", "actor") instance=ExtResource("3_5u10o")] blackboard = NodePath("@Node@223301") actor = NodePath("..") [connection signal="state_value_changed" from="." to="." method="_on_state_value_changed"] [connection signal="body_entered" from="sense_area" to="." method="_on_sense_area_body_entered"]