70 lines
2.3 KiB
Plaintext
70 lines
2.3 KiB
Plaintext
[gd_scene load_steps=10 format=3 uid="uid://beaktq6mygp6c"]
|
|
|
|
[ext_resource type="Script" path="res://scripts/items/fireball.gd" id="1_c103u"]
|
|
[ext_resource type="Texture2D" uid="uid://ddl5f3lldrp2n" path="res://assets/enemies.png" id="1_sy4od"]
|
|
[ext_resource type="AudioStream" uid="uid://si212xxdt3wk" path="res://assets/sounds/NES - Super Mario Bros - Sound Effects/Super Mario Bros 1 and 2(JP)/Fire Ball.wav" id="3_270oi"]
|
|
|
|
[sub_resource type="PhysicsMaterial" id="PhysicsMaterial_27hkc"]
|
|
friction = 0.0
|
|
bounce = 0.7
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_pjn1s"]
|
|
atlas = ExtResource("1_sy4od")
|
|
region = Rect2(364, 188, 8, 8)
|
|
|
|
[sub_resource type="SpriteFrames" id="SpriteFrames_unbxs"]
|
|
animations = [{
|
|
"frames": [{
|
|
"duration": 1.0,
|
|
"texture": SubResource("AtlasTexture_pjn1s")
|
|
}],
|
|
"loop": true,
|
|
"name": &"default",
|
|
"speed": 5.0
|
|
}]
|
|
|
|
[sub_resource type="CircleShape2D" id="CircleShape2D_pwt6i"]
|
|
radius = 5.09902
|
|
|
|
[sub_resource type="CircleShape2D" id="CircleShape2D_87wnf"]
|
|
radius = 6.0
|
|
|
|
[sub_resource type="CircleShape2D" id="CircleShape2D_ly4gs"]
|
|
radius = 5.0
|
|
|
|
[node name="Fireball" type="RigidBody2D"]
|
|
collision_layer = 8
|
|
physics_material_override = SubResource("PhysicsMaterial_27hkc")
|
|
can_sleep = false
|
|
script = ExtResource("1_c103u")
|
|
|
|
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
|
|
z_index = 20
|
|
sprite_frames = SubResource("SpriteFrames_unbxs")
|
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
|
shape = SubResource("CircleShape2D_pwt6i")
|
|
|
|
[node name="Timer" type="Timer" parent="."]
|
|
wait_time = 2.0
|
|
one_shot = true
|
|
|
|
[node name="CollCount" type="Area2D" parent="."]
|
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="CollCount"]
|
|
shape = SubResource("CircleShape2D_87wnf")
|
|
|
|
[node name="EnemieDie" type="Area2D" parent="."]
|
|
collision_mask = 128
|
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="EnemieDie"]
|
|
shape = SubResource("CircleShape2D_ly4gs")
|
|
|
|
[node name="AudioStreamPlayer2D" type="AudioStreamPlayer2D" parent="."]
|
|
stream = ExtResource("3_270oi")
|
|
|
|
[connection signal="timeout" from="Timer" to="." method="_on_timer_timeout"]
|
|
[connection signal="body_entered" from="CollCount" to="." method="_on_area_2d_body_entered"]
|
|
[connection signal="area_entered" from="EnemieDie" to="." method="_on_enemie_die_area_entered"]
|
|
[connection signal="body_entered" from="EnemieDie" to="." method="_on_enemie_die_body_entered"]
|