TowerGame/objects/buildings/turret.tscn

52 lines
2.0 KiB
Plaintext

[gd_scene load_steps=8 format=3 uid="uid://cw3vtaevqx20y"]
[ext_resource type="PackedScene" uid="uid://b1fnsl3k1mo5c" path="res://objects/buildings/building.tscn" id="1_cgb0l"]
[ext_resource type="Script" uid="uid://bl78fqp1abxd6" path="res://scripts/buildings/turret.gd" id="2_brx0q"]
[ext_resource type="Script" uid="uid://bshiyw2k3op02" path="res://scripts/building_components/consumer.gd" id="2_wh3b5"]
[ext_resource type="PackedScene" uid="uid://cav22qho14o47" path="res://objects/bullet.tscn" id="3_kpsgq"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_cgb0l"]
albedo_color = Color(0, 0.00397563, 1, 1)
[sub_resource type="CylinderMesh" id="CylinderMesh_kpsgq"]
material = SubResource("StandardMaterial3D_cgb0l")
top_radius = 1.0
bottom_radius = 1.0
height = 0.5
radial_segments = 16
rings = 0
[sub_resource type="CylinderMesh" id="CylinderMesh_vuktq"]
material = SubResource("StandardMaterial3D_cgb0l")
top_radius = 0.2
bottom_radius = 0.25
height = 1.0
rings = 0
[node name="Turret" instance=ExtResource("1_cgb0l")]
script = ExtResource("2_brx0q")
ammo_cap = 10
fire_cooldown_time = 0.2
reload_time = 1.0
bullet_scene = ExtResource("3_kpsgq")
fire_position = Vector3(0, 1, 0)
shot_impulse = 100.0
lead_shot_factor = 0.01
[node name="MeshInstance3D" parent="." index="0"]
material_override = SubResource("StandardMaterial3D_cgb0l")
[node name="MeshInstance3D" type="MeshInstance3D" parent="MeshInstance3D" index="0"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.25, 0)
mesh = SubResource("CylinderMesh_kpsgq")
[node name="MeshInstance3D" type="MeshInstance3D" parent="MeshInstance3D/MeshInstance3D" index="0"]
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, -1, 0, 1, -4.37114e-08, 0, 0, 1)
mesh = SubResource("CylinderMesh_vuktq")
[node name="Consumer" type="Node" parent="." index="5"]
script = ExtResource("2_wh3b5")
metadata/_custom_type_script = "uid://bshiyw2k3op02"
[connection signal="item_added" from="Consumer" to="." method="_on_consumer_item_added"]