Add bullet shooting mechanics and refactor scenes
This commit is contained in:
parent
8501c18dd1
commit
85155b1c7d
6 changed files with 156 additions and 97 deletions
23
scenes/bullet.tscn
Normal file
23
scenes/bullet.tscn
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
[gd_scene load_steps=4 format=3 uid="uid://bus77xvomweiu"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://byl2w624w0lpb" path="res://scenes/bullet.gd" id="1_y25gk"]
|
||||
[ext_resource type="Texture2D" uid="uid://bltpqew3le1j" path="res://resources/Mini Pixel Pack 3/Projectiles/Player_charged_beam (16 x 16).png" id="2_l5glv"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_eoqba"]
|
||||
size = Vector2(12, 11)
|
||||
|
||||
[node name="Bullet" type="Area2D"]
|
||||
script = ExtResource("1_y25gk")
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||
texture = ExtResource("2_l5glv")
|
||||
hframes = 2
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
position = Vector2(0, -0.5)
|
||||
shape = SubResource("RectangleShape2D_eoqba")
|
||||
|
||||
[node name="VisibleOnScreenNotifier2D" type="VisibleOnScreenNotifier2D" parent="."]
|
||||
|
||||
[connection signal="area_entered" from="." to="." method="_on_area_entered"]
|
||||
[connection signal="screen_exited" from="VisibleOnScreenNotifier2D" to="." method="_on_visible_on_screen_notifier_2d_screen_exited"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue