Turret shooting and damaing

This commit is contained in:
2025-08-30 13:05:50 +08:00
parent 1c6c03cd41
commit 7438ba407a
14 changed files with 410 additions and 14 deletions

View File

@@ -1,7 +1,8 @@
[gd_scene load_steps=5 format=3 uid="uid://dbup2pvjl8het"]
[gd_scene load_steps=6 format=3 uid="uid://dbup2pvjl8het"]
[ext_resource type="Script" uid="uid://n5g6i0uovxfk" path="res://Scripts/Tiles/TurretTile.cs" id="1_j3157"]
[ext_resource type="Texture2D" uid="uid://ckssi7soymu7g" path="res://Scenes/Tiles/TurretTile.png" id="2_7ljeh"]
[ext_resource type="PackedScene" uid="uid://erqawdsydh6a" path="res://Scenes/Entities/Bullet.tscn" id="2_gfad6"]
[ext_resource type="Texture2D" uid="uid://dmbbkwgff7dej" path="res://Scenes/Tiles/TurretTileBarrel.png" id="3_gfad6"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_pndcb"]
@@ -9,6 +10,8 @@ size = Vector2(54, 54)
[node name="Turret" type="StaticBody2D"]
script = ExtResource("1_j3157")
BulletScene = ExtResource("2_gfad6")
BarrelTipPath = NodePath("Barrel/Marker2D")
TileId = "turret"
[node name="Sprite2D" type="Sprite2D" parent="."]
@@ -21,6 +24,10 @@ scale = Vector2(0.08, 0.08)
texture = ExtResource("3_gfad6")
offset = Vector2(0, -54)
[node name="Marker2D" type="Marker2D" parent="Barrel"]
position = Vector2(0, 37.5)
scale = Vector2(12.5, 12.5)
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("RectangleShape2D_pndcb")