88 lines
2.1 KiB
Plaintext
88 lines
2.1 KiB
Plaintext
|
[gd_scene load_steps=6 format=2]
|
||
|
|
||
|
[ext_resource path="res://Turret.gd" type="Script" id=1]
|
||
|
[ext_resource path="res://art/turret/turret.png" type="Texture" id=2]
|
||
|
[ext_resource path="res://art/turret/shootin.png" type="Texture" id=3]
|
||
|
|
||
|
[sub_resource type="CircleShape2D" id=1]
|
||
|
|
||
|
custom_solver_bias = 0.0
|
||
|
radius = 32.0821
|
||
|
|
||
|
[sub_resource type="SpriteFrames" id=2]
|
||
|
|
||
|
animations = [ {
|
||
|
"frames": [ ExtResource( 2 ), ExtResource( 3 ) ],
|
||
|
"loop": true,
|
||
|
"name": "default",
|
||
|
"speed": 5.0
|
||
|
} ]
|
||
|
|
||
|
[node name="Turret" type="Node2D"]
|
||
|
|
||
|
script = ExtResource( 1 )
|
||
|
_sections_unfolded = [ "Material", "Pause", "Transform", "Visibility", "Z Index" ]
|
||
|
|
||
|
[node name="Beam" type="Line2D" parent="." index="0"]
|
||
|
|
||
|
position = Vector2( -26.6667, 6.66667 )
|
||
|
points = PoolVector2Array( 26.4234, -6.61987, 2000, 0 )
|
||
|
width = 10.0
|
||
|
default_color = Color( 1, 0, 0, 0 )
|
||
|
texture_mode = 31
|
||
|
sharp_limit = 2.0
|
||
|
round_precision = 8
|
||
|
|
||
|
[node name="Range" type="Area2D" parent="." index="1"]
|
||
|
|
||
|
position = Vector2( -51.824, -18.5961 )
|
||
|
scale = Vector2( 30.8534, 30.8534 )
|
||
|
input_pickable = true
|
||
|
gravity_vec = Vector2( 0, 1 )
|
||
|
gravity = 98.0
|
||
|
linear_damp = 0.1
|
||
|
angular_damp = 1.0
|
||
|
monitorable = false
|
||
|
collision_layer = 31
|
||
|
collision_mask = 31
|
||
|
audio_bus_override = false
|
||
|
audio_bus_name = "Master"
|
||
|
_sections_unfolded = [ "Collision" ]
|
||
|
__meta__ = {
|
||
|
"_edit_group_": true
|
||
|
}
|
||
|
|
||
|
[node name="RangeCircle" type="CollisionShape2D" parent="Range" index="0"]
|
||
|
|
||
|
shape = SubResource( 1 )
|
||
|
|
||
|
[node name="FlashTimer" type="Timer" parent="." index="2"]
|
||
|
|
||
|
process_mode = 1
|
||
|
wait_time = 0.15
|
||
|
one_shot = false
|
||
|
autostart = false
|
||
|
|
||
|
[node name="ReloadTimer" type="Timer" parent="." index="3"]
|
||
|
|
||
|
process_mode = 1
|
||
|
wait_time = 1.0
|
||
|
one_shot = false
|
||
|
autostart = true
|
||
|
|
||
|
[node name="TurretSprite" type="AnimatedSprite" parent="." index="4"]
|
||
|
|
||
|
rotation = 0.785398
|
||
|
scale = Vector2( 0.12, 0.12 )
|
||
|
frames = SubResource( 2 )
|
||
|
animation = "default"
|
||
|
_sections_unfolded = [ "Transform" ]
|
||
|
|
||
|
[connection signal="area_shape_entered" from="Range" to="." method="entityEnteredRange"]
|
||
|
|
||
|
[connection signal="timeout" from="FlashTimer" to="." method="_on_FlashTimer_timeout"]
|
||
|
|
||
|
[connection signal="timeout" from="ReloadTimer" to="." method="_on_ReloadTimer_timeout"]
|
||
|
|
||
|
|