2023-10-06 11:40:11 +02:00
|
|
|
[gd_scene load_steps=14 format=3 uid="uid://dij57511gfg4t"]
|
|
|
|
|
2023-10-06 17:47:24 +02:00
|
|
|
[ext_resource type="Script" path="res://scripts/towers/tower.gd" id="1_eyei4"]
|
2023-10-21 17:45:51 +02:00
|
|
|
[ext_resource type="AudioStream" uid="uid://bx4oba7yo6duu" path="res://assets/audio/cannon.mp3" id="3_cih6o"]
|
2023-10-06 17:47:24 +02:00
|
|
|
[ext_resource type="Texture2D" uid="uid://br7wgq61n6ufv" path="res://assets/spritesheets/towers/cannon-2.png" id="3_us71t"]
|
2023-10-06 11:40:11 +02:00
|
|
|
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_74asi"]
|
2023-10-06 17:47:24 +02:00
|
|
|
atlas = ExtResource("3_us71t")
|
2023-10-06 11:40:11 +02:00
|
|
|
region = Rect2(0, 0, 128, 128)
|
|
|
|
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_ug5lf"]
|
2023-10-06 17:47:24 +02:00
|
|
|
atlas = ExtResource("3_us71t")
|
2023-10-06 11:40:11 +02:00
|
|
|
region = Rect2(128, 0, 128, 128)
|
|
|
|
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_vs27q"]
|
2023-10-06 17:47:24 +02:00
|
|
|
atlas = ExtResource("3_us71t")
|
2023-10-06 11:40:11 +02:00
|
|
|
region = Rect2(256, 0, 128, 128)
|
|
|
|
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_h1use"]
|
2023-10-06 17:47:24 +02:00
|
|
|
atlas = ExtResource("3_us71t")
|
2023-10-06 11:40:11 +02:00
|
|
|
region = Rect2(384, 0, 128, 128)
|
|
|
|
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_3rr0n"]
|
2023-10-06 17:47:24 +02:00
|
|
|
atlas = ExtResource("3_us71t")
|
2023-10-06 11:40:11 +02:00
|
|
|
region = Rect2(512, 0, 128, 128)
|
|
|
|
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_w8pr4"]
|
2023-10-06 17:47:24 +02:00
|
|
|
atlas = ExtResource("3_us71t")
|
2023-10-06 11:40:11 +02:00
|
|
|
region = Rect2(640, 0, 128, 128)
|
|
|
|
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_bagik"]
|
2023-10-06 17:47:24 +02:00
|
|
|
atlas = ExtResource("3_us71t")
|
2023-10-06 11:40:11 +02:00
|
|
|
region = Rect2(768, 0, 128, 128)
|
|
|
|
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_tv6sf"]
|
2023-10-06 17:47:24 +02:00
|
|
|
atlas = ExtResource("3_us71t")
|
2023-10-06 11:40:11 +02:00
|
|
|
region = Rect2(896, 0, 128, 128)
|
|
|
|
|
|
|
|
[sub_resource type="SpriteFrames" id="SpriteFrames_gp0wd"]
|
|
|
|
animations = [{
|
|
|
|
"frames": [{
|
|
|
|
"duration": 1.0,
|
|
|
|
"texture": SubResource("AtlasTexture_74asi")
|
|
|
|
}, {
|
|
|
|
"duration": 1.0,
|
|
|
|
"texture": SubResource("AtlasTexture_ug5lf")
|
|
|
|
}, {
|
|
|
|
"duration": 1.0,
|
|
|
|
"texture": SubResource("AtlasTexture_vs27q")
|
|
|
|
}, {
|
|
|
|
"duration": 1.0,
|
|
|
|
"texture": SubResource("AtlasTexture_h1use")
|
|
|
|
}, {
|
|
|
|
"duration": 1.0,
|
|
|
|
"texture": SubResource("AtlasTexture_3rr0n")
|
|
|
|
}, {
|
|
|
|
"duration": 1.0,
|
|
|
|
"texture": SubResource("AtlasTexture_w8pr4")
|
|
|
|
}, {
|
|
|
|
"duration": 1.0,
|
|
|
|
"texture": SubResource("AtlasTexture_bagik")
|
|
|
|
}, {
|
|
|
|
"duration": 1.0,
|
|
|
|
"texture": SubResource("AtlasTexture_tv6sf")
|
|
|
|
}],
|
|
|
|
"loop": true,
|
|
|
|
"name": &"default",
|
|
|
|
"speed": 5.0
|
|
|
|
}]
|
|
|
|
|
|
|
|
[sub_resource type="CircleShape2D" id="CircleShape2D_wmsbt"]
|
|
|
|
radius = 138.293
|
|
|
|
|
|
|
|
[node name="cannon-2" type="Node2D" groups=["Towers"]]
|
2023-10-06 17:47:24 +02:00
|
|
|
script = ExtResource("1_eyei4")
|
2023-10-06 11:40:11 +02:00
|
|
|
|
|
|
|
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
|
|
|
|
position = Vector2(-1, 0)
|
|
|
|
rotation = 1.5708
|
|
|
|
sprite_frames = SubResource("SpriteFrames_gp0wd")
|
|
|
|
|
|
|
|
[node name="Area2D" type="Area2D" parent="."]
|
|
|
|
|
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
|
|
|
|
shape = SubResource("CircleShape2D_wmsbt")
|
|
|
|
|
|
|
|
[node name="RayCast2D" type="RayCast2D" parent="."]
|
|
|
|
|
|
|
|
[node name="Timer" type="Timer" parent="."]
|
|
|
|
one_shot = true
|
|
|
|
|
2023-10-07 18:13:45 +02:00
|
|
|
[node name="HealthBar" type="ProgressBar" parent="."]
|
|
|
|
modulate = Color(0.431373, 0.815686, 0, 1)
|
|
|
|
offset_left = 4.0
|
|
|
|
offset_top = -15.0
|
|
|
|
offset_right = 106.0
|
|
|
|
offset_bottom = 12.0
|
|
|
|
rotation = 1.5708
|
|
|
|
scale = Vector2(0.3, 0.3)
|
|
|
|
show_percentage = false
|
|
|
|
|
2023-10-21 17:45:51 +02:00
|
|
|
[node name="Shoot" type="AudioStreamPlayer2D" parent="."]
|
|
|
|
stream = ExtResource("3_cih6o")
|
2023-10-25 11:27:45 +02:00
|
|
|
volume_db = 1.0
|
2023-10-21 17:45:51 +02:00
|
|
|
|
2023-10-06 11:40:11 +02:00
|
|
|
[connection signal="body_entered" from="Area2D" to="." method="_on_body_entered"]
|
|
|
|
[connection signal="body_exited" from="Area2D" to="." method="_on_body_exited"]
|