TowerGameProto/objects/turret.tscn

49 lines
2.0 KiB
Plaintext
Raw Normal View History

2025-04-16 22:56:14 +01:00
[gd_scene load_steps=10 format=3 uid="uid://buveekbt35pk2"]
[ext_resource type="Script" uid="uid://dqwkwjkvo374n" path="res://scripts/Turret.gd" id="1_50gud"]
[ext_resource type="PackedScene" uid="uid://dx2wpxj51mnju" path="res://objects/bullet.tscn" id="2_4h670"]
[ext_resource type="Resource" uid="uid://dtem6pgfrxmm7" path="res://items/bullet.res" id="3_s8ob3"]
[ext_resource type="Texture2D" uid="uid://ba7x80lx3rjsw" path="res://assets/turret.png" id="4_3q0ie"]
[ext_resource type="Script" uid="uid://bha4kv6d0iba0" path="res://scripts/Item.gd" id="4_ppeal"]
[ext_resource type="Script" uid="uid://inyhfjkw5h2u" path="res://scripts/PathfindObstacle.gd" id="5_4h670"]
[ext_resource type="Resource" uid="uid://cgxall2fn3bsn" path="res://items/copper.res" id="5_bn0qb"]
[ext_resource type="PackedScene" uid="uid://bul5wdylupx54" path="res://objects/parts/detection_area.tscn" id="8_ppeal"]
[sub_resource type="CircleShape2D" id="CircleShape2D_ppeal"]
radius = 32.0
[node name="Turret" type="StaticBody2D"]
collision_layer = 4
collision_mask = 7
input_pickable = true
script = ExtResource("1_50gud")
bullet_scene = ExtResource("2_4h670")
bullet_item = ExtResource("3_s8ob3")
fire_period = 0.1
detection_poll_time = 0.1
source_limit = 3
build_materials_required = Dictionary[ExtResource("4_ppeal"), int]({
ExtResource("5_bn0qb"): 8
})
[node name="Sprite2D" type="Sprite2D" parent="."]
visible = false
texture = ExtResource("4_3q0ie")
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("CircleShape2D_ppeal")
[node name="Polygon2D" type="Polygon2D" parent="."]
color = Color(0, 0, 1, 1)
polygon = PackedVector2Array(-32, 0, -28, -16, -16, -28, 0, -32, 16, -28, 28, -16, 32, 0, 28, 16, 16, 28, 0, 32, -16, 28, -28, 16)
[node name="PathfindObstacle" type="Node2D" parent="."]
script = ExtResource("5_4h670")
added_weight = 99.0
metadata/_custom_type_script = "uid://inyhfjkw5h2u"
[node name="DetectionArea" parent="." instance=ExtResource("8_ppeal")]
radius = 500.0
requires_line_of_sight = true
active_state = null