Add charge throw mechanics; refactor bullet and brick components

This commit is contained in:
2025-05-12 23:08:54 +02:00
parent b09bee9fb6
commit 59c309409c
34 changed files with 422 additions and 96 deletions

View File

@@ -1,8 +1,12 @@
[gd_scene load_steps=5 format=3 uid="uid://bhc7y4xugu4q7"]
[gd_scene load_steps=9 format=3 uid="uid://bhc7y4xugu4q7"]
[ext_resource type="Texture2D" uid="uid://djifxc5x0dyrw" path="res://sprites/ppc_tileset.png" id="1_w543f"]
[ext_resource type="Script" uid="uid://dkmxhjtmu5xlb" path="res://scripts/components/damage_component.gd" id="2_ll0xw"]
[ext_resource type="Script" uid="uid://bh2vrkdbrtpin" path="res://scripts/components/bullet.gd" id="3_keogl"]
[ext_resource type="Script" uid="uid://cdnwrn8v05qhi" path="res://scripts/components/bullet_component.gd" id="3_keogl"]
[ext_resource type="Script" uid="uid://1tnr46o1ib4u" path="res://scripts/components/out_of_screen_component.gd" id="4_lqg4f"]
[ext_resource type="Script" uid="uid://bvsgg8lu0a8m6" path="res://scripts/components/lifetime_component.gd" id="5_qsc5m"]
[ext_resource type="Script" uid="uid://873un8agkyja" path="res://scripts/components/launch_component.gd" id="6_6th6w"]
[ext_resource type="Script" uid="uid://cvcnfrr1udco5" path="res://scripts/components/straight_motion_component.gd" id="7_e0mqp"]
[sub_resource type="CircleShape2D" id="CircleShape2D_txsw8"]
radius = 4.0
@@ -29,13 +33,34 @@ scale = Vector2(0.4, 0.4)
script = ExtResource("2_ll0xw")
area2d = NodePath("..")
[node name="BulletComponent" type="Node2D" parent="." node_paths=PackedStringArray("root", "area2d", "visibility_notifier", "timer")]
script = ExtResource("3_keogl")
root = NodePath("..")
speed = 120.0
area2d = NodePath("..")
[node name="Timer" type="Timer" parent="."]
wait_time = 5.0
autostart = true
[node name="OutOfScreenComponent" type="Node" parent="." node_paths=PackedStringArray("visibility_notifier", "root")]
script = ExtResource("4_lqg4f")
visibility_notifier = NodePath("../VisibleOnScreenNotifier2D")
root = NodePath("..")
[node name="LifetimeComponent" type="Node" parent="." node_paths=PackedStringArray("root", "timer")]
script = ExtResource("5_qsc5m")
root = NodePath("..")
life_time = 10.0
timer = NodePath("../Timer")
[node name="Timer" type="Timer" parent="."]
autostart = true
[node name="LaunchComponent" type="Node2D" parent="." node_paths=PackedStringArray("root")]
script = ExtResource("6_6th6w")
root = NodePath("..")
speed = 120.0
metadata/_custom_type_script = "uid://873un8agkyja"
[node name="StraightMotionComponent" type="Node" parent="." node_paths=PackedStringArray("root", "launch_component")]
script = ExtResource("7_e0mqp")
root = NodePath("..")
launch_component = NodePath("../LaunchComponent")
[node name="BulletComponent" type="Node" parent="." node_paths=PackedStringArray("root", "area2d")]
script = ExtResource("3_keogl")
root = NodePath("..")
area2d = NodePath("..")
metadata/_custom_type_script = "uid://cdnwrn8v05qhi"