VampireSurvivor/scenes/gun.tscn

35 lines
1.1 KiB
Plaintext

[gd_scene load_steps=5 format=3 uid="uid://brfhf78xw4dwm"]
[ext_resource type="Script" uid="uid://gcqdkullomv7" path="res://scripts/gun.gd" id="1_dk5gl"]
[ext_resource type="Texture2D" uid="uid://cswb5do8rrj7q" path="res://pistol/pistol.png" id="1_swcir"]
[ext_resource type="PackedScene" uid="uid://doyitruir4guy" path="res://scenes/bullet.tscn" id="2_kw0bs"]
[sub_resource type="CircleShape2D" id="CircleShape2D_o2wld"]
radius = 500.0
[node name="Gun" type="Area2D"]
collision_layer = 0
collision_mask = 2
script = ExtResource("1_dk5gl")
bullet = ExtResource("2_kw0bs")
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("CircleShape2D_o2wld")
[node name="Pivot" type="Marker2D" parent="."]
[node name="Pistol" type="Sprite2D" parent="Pivot"]
position = Vector2(172, -14)
texture = ExtResource("1_swcir")
[node name="ShootingPoint" type="Marker2D" parent="Pivot/Pistol"]
unique_name_in_owner = true
position = Vector2(25, -11)
[node name="Timer" type="Timer" parent="."]
unique_name_in_owner = true
wait_time = 0.5
autostart = true
[connection signal="timeout" from="Timer" to="." method="shoot"]