149 lines
4 KiB
Text
149 lines
4 KiB
Text
[gd_scene load_steps=9 format=3 uid="uid://mp72cjiuquik"]
|
|
|
|
[ext_resource type="Script" uid="uid://xoihsrr4hw4k" path="res://enemy.gd" id="1_4gyqm"]
|
|
[ext_resource type="Texture2D" uid="uid://deyu1prtitqcp" path="res://Mini Pixel Pack 3/Enemies/Bon_Bon (16 x 16).png" id="1_7k104"]
|
|
[ext_resource type="Texture2D" uid="uid://h04wm5a27u0" path="res://Mini Pixel Pack 3/Effects/Explosion (16 x 16).png" id="3_qi2p4"]
|
|
|
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_4gyqm"]
|
|
size = Vector2(14, 8)
|
|
|
|
[sub_resource type="Animation" id="Animation_iifgy"]
|
|
length = 0.001
|
|
tracks/0/type = "value"
|
|
tracks/0/imported = false
|
|
tracks/0/enabled = true
|
|
tracks/0/path = NodePath("Sprite2D:texture")
|
|
tracks/0/interp = 1
|
|
tracks/0/loop_wrap = true
|
|
tracks/0/keys = {
|
|
"times": PackedFloat32Array(0),
|
|
"transitions": PackedFloat32Array(1),
|
|
"update": 1,
|
|
"values": [ExtResource("1_7k104")]
|
|
}
|
|
tracks/1/type = "value"
|
|
tracks/1/imported = false
|
|
tracks/1/enabled = true
|
|
tracks/1/path = NodePath("Sprite2D:hframes")
|
|
tracks/1/interp = 1
|
|
tracks/1/loop_wrap = true
|
|
tracks/1/keys = {
|
|
"times": PackedFloat32Array(0),
|
|
"transitions": PackedFloat32Array(1),
|
|
"update": 1,
|
|
"values": [4]
|
|
}
|
|
tracks/2/type = "value"
|
|
tracks/2/imported = false
|
|
tracks/2/enabled = true
|
|
tracks/2/path = NodePath("Sprite2D:frame")
|
|
tracks/2/interp = 1
|
|
tracks/2/loop_wrap = true
|
|
tracks/2/keys = {
|
|
"times": PackedFloat32Array(0),
|
|
"transitions": PackedFloat32Array(1),
|
|
"update": 1,
|
|
"values": [2]
|
|
}
|
|
|
|
[sub_resource type="Animation" id="Animation_qi2p4"]
|
|
resource_name = "bounce"
|
|
loop_mode = 1
|
|
step = 0.05
|
|
tracks/0/type = "value"
|
|
tracks/0/imported = false
|
|
tracks/0/enabled = true
|
|
tracks/0/path = NodePath("Sprite2D:texture")
|
|
tracks/0/interp = 1
|
|
tracks/0/loop_wrap = true
|
|
tracks/0/keys = {
|
|
"times": PackedFloat32Array(0),
|
|
"transitions": PackedFloat32Array(1),
|
|
"update": 1,
|
|
"values": [ExtResource("1_7k104")]
|
|
}
|
|
tracks/1/type = "value"
|
|
tracks/1/imported = false
|
|
tracks/1/enabled = true
|
|
tracks/1/path = NodePath("Sprite2D:hframes")
|
|
tracks/1/interp = 1
|
|
tracks/1/loop_wrap = true
|
|
tracks/1/keys = {
|
|
"times": PackedFloat32Array(0),
|
|
"transitions": PackedFloat32Array(1),
|
|
"update": 1,
|
|
"values": [4]
|
|
}
|
|
tracks/2/type = "value"
|
|
tracks/2/imported = false
|
|
tracks/2/enabled = true
|
|
tracks/2/path = NodePath("Sprite2D:frame")
|
|
tracks/2/interp = 1
|
|
tracks/2/loop_wrap = true
|
|
tracks/2/keys = {
|
|
"times": PackedFloat32Array(0, 0.1023555, 0.2, 0.3, 0.35),
|
|
"transitions": PackedFloat32Array(1, 1, 1, 1, 1),
|
|
"update": 1,
|
|
"values": [2, 1, 0, 3, 0]
|
|
}
|
|
|
|
[sub_resource type="Animation" id="Animation_epg4t"]
|
|
resource_name = "explode"
|
|
step = 0.05
|
|
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.1, 0.2, 0.3, 0.4),
|
|
"transitions": PackedFloat32Array(1, 1, 1, 1, 1),
|
|
"update": 1,
|
|
"values": [0, 1, 2, 4, 5]
|
|
}
|
|
tracks/1/type = "value"
|
|
tracks/1/imported = false
|
|
tracks/1/enabled = true
|
|
tracks/1/path = NodePath("Sprite2D:texture")
|
|
tracks/1/interp = 1
|
|
tracks/1/loop_wrap = true
|
|
tracks/1/keys = {
|
|
"times": PackedFloat32Array(0),
|
|
"transitions": PackedFloat32Array(1),
|
|
"update": 1,
|
|
"values": [ExtResource("3_qi2p4")]
|
|
}
|
|
|
|
[sub_resource type="AnimationLibrary" id="AnimationLibrary_3yqyl"]
|
|
_data = {
|
|
&"RESET": SubResource("Animation_iifgy"),
|
|
&"bounce": SubResource("Animation_qi2p4"),
|
|
&"explode": SubResource("Animation_epg4t")
|
|
}
|
|
|
|
[node name="Enemy" type="Area2D" groups=["enemies"]]
|
|
script = ExtResource("1_4gyqm")
|
|
|
|
[node name="Sprite2D" type="Sprite2D" parent="."]
|
|
texture = ExtResource("1_7k104")
|
|
hframes = 4
|
|
frame = 2
|
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
|
shape = SubResource("RectangleShape2D_4gyqm")
|
|
|
|
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
|
libraries = {
|
|
&"": SubResource("AnimationLibrary_3yqyl")
|
|
}
|
|
autoplay = "bounce"
|
|
|
|
[node name="MoveTimer" type="Timer" parent="."]
|
|
one_shot = true
|
|
|
|
[node name="ShootTimer" type="Timer" parent="."]
|
|
one_shot = true
|
|
|
|
[connection signal="timeout" from="MoveTimer" to="." method="_on_timer_timeout"]
|
|
[connection signal="timeout" from="ShootTimer" to="." method="_on_shoot_timer_timeout"]
|