101 lines
2.9 KiB
Plaintext
101 lines
2.9 KiB
Plaintext
[gd_scene load_steps=10 format=3 uid="uid://cwviqxncs4fom"]
|
|
|
|
[ext_resource type="Texture2D" uid="uid://ddl5f3lldrp2n" path="res://assets/enemies.png" id="1_fe7l6"]
|
|
[ext_resource type="Script" path="res://scripts/gumba.gd" id="1_o30u3"]
|
|
[ext_resource type="AudioStream" uid="uid://vq1g2x6id5jt" path="res://assets/sounds/NES - Super Mario Bros - Sound Effects/Super Mario Bros 1 and 2(JP)/Bump.wav" id="3_7yqeq"]
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_srbv5"]
|
|
atlas = ExtResource("1_fe7l6")
|
|
region = Rect2(0, 4, 16, 16)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_v5sjp"]
|
|
atlas = ExtResource("1_fe7l6")
|
|
region = Rect2(30, 4, 16, 16)
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_iyg37"]
|
|
atlas = ExtResource("1_fe7l6")
|
|
region = Rect2(60, 4, 16, 16)
|
|
|
|
[sub_resource type="SpriteFrames" id="SpriteFrames_xnecu"]
|
|
animations = [{
|
|
"frames": [{
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_srbv5")
|
|
}, {
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_v5sjp")
|
|
}],
|
|
"loop": true,
|
|
"name": &"default",
|
|
"speed": 10.0
|
|
}, {
|
|
"frames": [{
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_iyg37")
|
|
}],
|
|
"loop": true,
|
|
"name": &"die",
|
|
"speed": 5.0
|
|
}]
|
|
|
|
[sub_resource type="CircleShape2D" id="CircleShape2D_l4q7u"]
|
|
radius = 8.0
|
|
|
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_oec64"]
|
|
size = Vector2(10, 0.5)
|
|
|
|
[node name="Gumba" type="RigidBody2D"]
|
|
collision_layer = 8
|
|
lock_rotation = true
|
|
script = ExtResource("1_o30u3")
|
|
|
|
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
|
|
position = Vector2(8, -8)
|
|
sprite_frames = SubResource("SpriteFrames_xnecu")
|
|
autoplay = "default"
|
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
|
position = Vector2(8, -8)
|
|
shape = SubResource("CircleShape2D_l4q7u")
|
|
|
|
[node name="RayCastLeft" type="RayCast2D" parent="."]
|
|
position = Vector2(8, -8)
|
|
target_position = Vector2(-9, 0)
|
|
collision_mask = 17
|
|
|
|
[node name="RayCastLeft2" type="RayCast2D" parent="."]
|
|
position = Vector2(8, -8)
|
|
target_position = Vector2(-9, 0)
|
|
collision_mask = 2
|
|
|
|
[node name="RayCastRight" type="RayCast2D" parent="."]
|
|
position = Vector2(8, -8)
|
|
target_position = Vector2(9, 0)
|
|
collision_mask = 17
|
|
|
|
[node name="RayCastRight2" type="RayCast2D" parent="."]
|
|
position = Vector2(8, -8)
|
|
target_position = Vector2(9, 0)
|
|
collision_mask = 2
|
|
|
|
[node name="Timer" type="Timer" parent="."]
|
|
wait_time = 0.5
|
|
one_shot = true
|
|
|
|
[node name="die" type="Area2D" parent="."]
|
|
collision_mask = 2
|
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="die"]
|
|
position = Vector2(8, -16.25)
|
|
shape = SubResource("RectangleShape2D_oec64")
|
|
|
|
[node name="Timer2" type="Timer" parent="."]
|
|
one_shot = true
|
|
|
|
[node name="dieSound" type="AudioStreamPlayer2D" parent="."]
|
|
stream = ExtResource("3_7yqeq")
|
|
|
|
[connection signal="timeout" from="Timer" to="." method="_on_timer_timeout"]
|
|
[connection signal="body_entered" from="die" to="." method="_on_die_body_entered"]
|
|
[connection signal="timeout" from="Timer2" to="." method="_on_timer_2_timeout"]
|