[gd_scene load_steps=11 format=3 uid="uid://bdhod5c6o53ha"] [ext_resource type="PackedScene" uid="uid://b1hjjbdwf1rtc" path="res://scenes/entities/plants/plant_template.tscn" id="1_vmbvr"] [ext_resource type="Texture2D" uid="uid://coafh3mjharxo" path="res://assets/sprites/atlases/plants/spikeweed.png" id="2_ffrjr"] [ext_resource type="AudioStream" uid="uid://ypihbxy7tsqn" path="res://assets/audio/sfx/spikeweed_attack.mp3" id="3_5wcts"] [ext_resource type="Script" path="res://scripts/components/plants/AreaAttack.cs" id="3_hqtbm"] [ext_resource type="Script" path="res://scripts/components/plants/behaviours/SpikeweedBehaviour.cs" id="3_uhpn7"] [sub_resource type="Animation" id="Animation_7bhr0"] length = 0.001 tracks/0/type = "value" tracks/0/imported = false tracks/0/enabled = true tracks/0/path = NodePath("Sprite2D:frame") tracks/0/interp = 1 tracks/0/loop_wrap = true tracks/0/keys = { "times": PackedFloat32Array(0), "transitions": PackedFloat32Array(1), "update": 1, "values": [0] } [sub_resource type="Animation" id="Animation_swkxy"] resource_name = "attack" length = 0.666675 loop_mode = 1 step = 0.0833333 tracks/0/type = "value" tracks/0/imported = false tracks/0/enabled = true tracks/0/path = NodePath("Sprite2D:frame") tracks/0/interp = 1 tracks/0/loop_wrap = true tracks/0/keys = { "times": PackedFloat32Array(0, 0.166667, 0.333333, 0.5), "transitions": PackedFloat32Array(1, 1, 1, 1), "update": 1, "values": [3, 5, 7, 9] } tracks/1/type = "method" tracks/1/imported = false tracks/1/enabled = true tracks/1/path = NodePath("Hitbox") tracks/1/interp = 1 tracks/1/loop_wrap = true tracks/1/keys = { "times": PackedFloat32Array(0.166667), "transitions": PackedFloat32Array(1), "values": [{ "args": [], "method": &"Attack" }] } tracks/2/type = "audio" tracks/2/imported = false tracks/2/enabled = true tracks/2/path = NodePath("AudioStreamPlayer2D") tracks/2/interp = 1 tracks/2/loop_wrap = true tracks/2/keys = { "clips": [{ "end_offset": 0.0, "start_offset": 0.0, "stream": ExtResource("3_5wcts") }], "times": PackedFloat32Array(0.166667) } tracks/2/use_blend = true [sub_resource type="Animation" id="Animation_h2f35"] resource_name = "idle" length = 2.50001 loop_mode = 1 step = 0.0833333 tracks/0/type = "value" tracks/0/imported = false tracks/0/enabled = true tracks/0/path = NodePath("Sprite2D:frame") tracks/0/interp = 1 tracks/0/loop_wrap = true tracks/0/keys = { "times": PackedFloat32Array(0, 0.166667, 0.333333, 0.5, 0.666667, 0.833333, 1, 2, 2.16667, 2.33333), "transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1), "update": 1, "values": [0, 2, 4, 6, 8, 10, 12, 6, 8, 14] } [sub_resource type="AnimationLibrary" id="AnimationLibrary_m4h7k"] _data = { "RESET": SubResource("Animation_7bhr0"), "attack": SubResource("Animation_swkxy"), "idle": SubResource("Animation_h2f35") } [sub_resource type="RectangleShape2D" id="RectangleShape2D_1di76"] size = Vector2(49, 38) [node name="Spikeweed" instance=ExtResource("1_vmbvr")] [node name="Sprite2D" parent="." index="0"] texture = ExtResource("2_ffrjr") hframes = 2 vframes = 10 [node name="AnimationPlayer" parent="." index="1"] libraries = { "": SubResource("AnimationLibrary_m4h7k") } autoplay = "idle" [node name="Hitbox" parent="." index="2"] collision_layer = 4 collision_mask = 8 script = ExtResource("3_hqtbm") _damage = 2 [node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox" index="0"] position = Vector2(0.5, 9) shape = SubResource("RectangleShape2D_1di76") [node name="Behaviour" type="Node" parent="." index="3" node_paths=PackedStringArray("_player")] script = ExtResource("3_uhpn7") _player = NodePath("../AnimationPlayer") [node name="AudioStreamPlayer2D" type="AudioStreamPlayer2D" parent="." index="4"] [connection signal="area_entered" from="Hitbox" to="Behaviour" method="OnHitboxEntered"] [connection signal="area_exited" from="Hitbox" to="Behaviour" method="OnHitboxExited"]