Files
retromariogodot/scenes/enemies/plant.tscn
T
2024-08-03 10:52:53 +02:00

88 lines
2.3 KiB
Plaintext

[gd_scene load_steps=10 format=3 uid="uid://dn2sy74ad2qfh"]
[ext_resource type="Script" path="res://scripts/enemies/plant.gd" id="1_7t6jh"]
[ext_resource type="Texture2D" uid="uid://ddl5f3lldrp2n" path="res://assets/enemies.png" id="1_jnxrw"]
[sub_resource type="AtlasTexture" id="AtlasTexture_cyktl"]
atlas = ExtResource("1_jnxrw")
region = Rect2(390, 30, 16, 24)
[sub_resource type="AtlasTexture" id="AtlasTexture_dylf8"]
atlas = ExtResource("1_jnxrw")
region = Rect2(420, 30, 16, 24)
[sub_resource type="SpriteFrames" id="SpriteFrames_th7fo"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_cyktl")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_dylf8")
}],
"loop": true,
"name": &"default",
"speed": 5.0
}]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_mdpkr"]
size = Vector2(16, 24)
[sub_resource type="Animation" id="Animation_g0wcr"]
resource_name = "default"
length = 8.0
loop_mode = 1
tracks/0/type = "method"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(4, 8),
"transitions": PackedFloat32Array(1, 1),
"values": [{
"args": [],
"method": &"move_up"
}, {
"args": [],
"method": &"move_down"
}]
}
[sub_resource type="Animation" id="Animation_axvvr"]
length = 0.001
[sub_resource type="AnimationLibrary" id="AnimationLibrary_x0mu6"]
_data = {
"RESET": SubResource("Animation_axvvr"),
"default": SubResource("Animation_g0wcr")
}
[node name="Plant" type="Area2D"]
collision_layer = 128
collision_mask = 2
script = ExtResource("1_7t6jh")
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
position = Vector2(0, 13)
sprite_frames = SubResource("SpriteFrames_th7fo")
autoplay = "default"
frame_progress = 0.459679
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2(0, 13)
shape = SubResource("RectangleShape2D_mdpkr")
[node name="Timer" type="Timer" parent="."]
one_shot = true
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = {
"": SubResource("AnimationLibrary_x0mu6")
}
autoplay = "default"
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
[connection signal="timeout" from="Timer" to="." method="_on_timer_timeout"]