Refactor brick throwing mechanics; integrate new input handling and projectile initialization components
This commit is contained in:
@@ -1,9 +1,12 @@
|
||||
[gd_scene load_steps=6 format=3 uid="uid://bymro4t7angv5"]
|
||||
[gd_scene load_steps=9 format=3 uid="uid://bymro4t7angv5"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://djifxc5x0dyrw" path="res://sprites/ppc_tileset.png" id="1_1c3jb"]
|
||||
[ext_resource type="Script" uid="uid://cdnwrn8v05qhi" path="res://scripts/components/bullet_component.gd" id="2_i6t5k"]
|
||||
[ext_resource type="Script" uid="uid://dkmxhjtmu5xlb" path="res://scripts/components/damage_component.gd" id="3_8xipx"]
|
||||
[ext_resource type="Script" uid="uid://1tnr46o1ib4u" path="res://scripts/components/out_of_screen_component.gd" id="4_rdtjq"]
|
||||
[ext_resource type="Script" uid="uid://bgty7040ams6s" path="res://scripts/components/projectile_init_component.gd" id="5_2vqt8"]
|
||||
[ext_resource type="Script" uid="uid://873un8agkyja" path="res://scripts/components/launch_component.gd" id="6_d0tcd"]
|
||||
[ext_resource type="Script" uid="uid://cvcnfrr1udco5" path="res://scripts/components/straight_motion_component.gd" id="7_r41xl"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_ar0xf"]
|
||||
size = Vector2(16, 10)
|
||||
@@ -21,13 +24,10 @@ hframes = 12
|
||||
vframes = 12
|
||||
frame = 80
|
||||
|
||||
[node name="BulletComponent" type="Node" parent="." node_paths=PackedStringArray("root", "area2d", "timer")]
|
||||
[node name="BulletComponent" type="Node" parent="." node_paths=PackedStringArray("root", "area2d")]
|
||||
script = ExtResource("2_i6t5k")
|
||||
root = NodePath("..")
|
||||
speed = 320.0
|
||||
area2d = NodePath("..")
|
||||
life_time = 2.0
|
||||
timer = NodePath("../Timer")
|
||||
|
||||
[node name="VisibleOnScreenNotifier2D" type="VisibleOnScreenNotifier2D" parent="."]
|
||||
position = Vector2(0, 2.38419e-07)
|
||||
@@ -43,3 +43,20 @@ area2d = NodePath("..")
|
||||
script = ExtResource("4_rdtjq")
|
||||
visibility_notifier = NodePath("../VisibleOnScreenNotifier2D")
|
||||
root = NodePath("..")
|
||||
|
||||
[node name="ProjectileInitComponent" type="Node" parent="." node_paths=PackedStringArray("launch_component")]
|
||||
script = ExtResource("5_2vqt8")
|
||||
launch_component = NodePath("../LaunchComponent")
|
||||
metadata/_custom_type_script = "uid://bgty7040ams6s"
|
||||
|
||||
[node name="LaunchComponent" type="Node2D" parent="." node_paths=PackedStringArray("root")]
|
||||
script = ExtResource("6_d0tcd")
|
||||
root = NodePath(".")
|
||||
speed = 180.0
|
||||
metadata/_custom_type_script = "uid://873un8agkyja"
|
||||
|
||||
[node name="StraightMotionComponent" type="Node" parent="." node_paths=PackedStringArray("root", "launch_component")]
|
||||
script = ExtResource("7_r41xl")
|
||||
root = NodePath("..")
|
||||
launch_component = NodePath("../LaunchComponent")
|
||||
metadata/_custom_type_script = "uid://cvcnfrr1udco5"
|
||||
|
@@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=32 format=3 uid="uid://bqi5s710xb1ju"]
|
||||
[gd_scene load_steps=31 format=3 uid="uid://bqi5s710xb1ju"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://ccuddyoakg04u" path="res://scripts/player.gd" id="1_8j4h4"]
|
||||
[ext_resource type="Texture2D" uid="uid://b7gp0gqvkv8j4" path="res://sprites/MrBrick_base.png" id="2_bc55y"]
|
||||
@@ -26,7 +26,6 @@
|
||||
[ext_resource type="Script" uid="uid://bya240e627ti6" path="res://scripts/resources/skill_data.gd" id="21_d0oiv"]
|
||||
[ext_resource type="Resource" uid="uid://d3bjre2etov1n" path="res://resources/skills/magnetic.tres" id="22_vnsgd"]
|
||||
[ext_resource type="Script" uid="uid://bjsyeo1n7bsri" path="res://scripts/components/skill_unlocker_component.gd" id="23_qsv2c"]
|
||||
[ext_resource type="Script" uid="uid://c6fclevp3peuo" path="res://scripts/components/charge_throw_component.gd" id="27_h8c1m"]
|
||||
[ext_resource type="PackedScene" uid="uid://bg76mtpcmfm2j" path="res://objects/ui/charging_bar_layer.tscn" id="28_3f5nm"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_hdsg1"]
|
||||
@@ -159,16 +158,11 @@ stream = ExtResource("19_7anly")
|
||||
[node name="sfx_heal" type="AudioStreamPlayer2D" parent="."]
|
||||
stream = ExtResource("20_bptj5")
|
||||
|
||||
[node name="ChargeThrowComponent" type="Node" parent="."]
|
||||
script = ExtResource("27_h8c1m")
|
||||
metadata/_custom_type_script = "uid://c6fclevp3peuo"
|
||||
|
||||
[node name="ChargingBarLayer" parent="." node_paths=PackedStringArray("charge_throw_component") instance=ExtResource("28_3f5nm")]
|
||||
[node name="ChargingBarLayer" parent="." instance=ExtResource("28_3f5nm")]
|
||||
offset_left = -17.0
|
||||
offset_top = -30.0
|
||||
offset_right = 23.0
|
||||
offset_bottom = -20.0
|
||||
charge_throw_component = NodePath("../ChargeThrowComponent")
|
||||
|
||||
[connection signal="on_death" from="HealthComponent" to="PlayerDeathComponent" method="_on_health_component_on_death"]
|
||||
[connection signal="on_health_change" from="HealthComponent" to="KnockbackComponent" method="_on_health_component_on_health_change"]
|
||||
|
@@ -7,7 +7,7 @@
|
||||
[ext_resource type="Script" uid="uid://873un8agkyja" path="res://scripts/components/launch_component.gd" id="7_a2b5x"]
|
||||
[ext_resource type="Script" uid="uid://bvsgg8lu0a8m6" path="res://scripts/components/lifetime_component.gd" id="7_nqeob"]
|
||||
[ext_resource type="Script" uid="uid://c2gbumw4x4t1v" path="res://scripts/components/gravity_motion_component.gd" id="8_4ly8b"]
|
||||
[ext_resource type="Script" uid="uid://ciowd622nk0i7" path="res://scripts/components/chargable_component.gd" id="9_a2b5x"]
|
||||
[ext_resource type="Script" uid="uid://bgty7040ams6s" path="res://scripts/components/projectile_init_component.gd" id="8_nqeob"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_ar0xf"]
|
||||
size = Vector2(16, 10)
|
||||
@@ -85,5 +85,7 @@ collision_layer = 16
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="BulletArea"]
|
||||
shape = SubResource("RectangleShape2D_nqeob")
|
||||
|
||||
[node name="ChargableComponent" type="Node" parent="."]
|
||||
script = ExtResource("9_a2b5x")
|
||||
[node name="ProjectileInitComponent" type="Node" parent="." node_paths=PackedStringArray("launch_component")]
|
||||
script = ExtResource("8_nqeob")
|
||||
launch_component = NodePath("../LaunchComponent")
|
||||
metadata/_custom_type_script = "uid://bgty7040ams6s"
|
||||
|
@@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=8 format=3 uid="uid://daau4j5hbklk0"]
|
||||
[gd_scene load_steps=11 format=3 uid="uid://daau4j5hbklk0"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://djifxc5x0dyrw" path="res://sprites/ppc_tileset.png" id="1_52l28"]
|
||||
[ext_resource type="Script" uid="uid://cdnwrn8v05qhi" path="res://scripts/components/bullet_component.gd" id="2_hjcob"]
|
||||
@@ -6,11 +6,14 @@
|
||||
[ext_resource type="Resource" uid="uid://obodgnkhxuhe" path="res://resources/status_effect/fire.tres" id="4_xx5l4"]
|
||||
[ext_resource type="Script" uid="uid://d3brcje121krs" path="res://scripts/components/effect_inflictor_component.gd" id="5_ofrqk"]
|
||||
[ext_resource type="Script" uid="uid://1tnr46o1ib4u" path="res://scripts/components/out_of_screen_component.gd" id="6_64yur"]
|
||||
[ext_resource type="Script" uid="uid://873un8agkyja" path="res://scripts/components/launch_component.gd" id="7_hulun"]
|
||||
[ext_resource type="Script" uid="uid://cvcnfrr1udco5" path="res://scripts/components/straight_motion_component.gd" id="8_kift8"]
|
||||
[ext_resource type="Script" uid="uid://bgty7040ams6s" path="res://scripts/components/projectile_init_component.gd" id="9_5ybdf"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_ar0xf"]
|
||||
size = Vector2(16, 10)
|
||||
|
||||
[node name="Brick" type="Area2D"]
|
||||
[node name="FireBrick" type="Area2D"]
|
||||
collision_layer = 16
|
||||
collision_mask = 9
|
||||
|
||||
@@ -23,13 +26,10 @@ hframes = 12
|
||||
vframes = 12
|
||||
frame = 80
|
||||
|
||||
[node name="BulletComponent" type="Node" parent="." node_paths=PackedStringArray("root", "area2d", "timer")]
|
||||
[node name="BulletComponent" type="Node" parent="." node_paths=PackedStringArray("root", "area2d")]
|
||||
script = ExtResource("2_hjcob")
|
||||
root = NodePath("..")
|
||||
speed = 330.0
|
||||
area2d = NodePath("..")
|
||||
life_time = 2.0
|
||||
timer = NodePath("../Timer")
|
||||
|
||||
[node name="VisibleOnScreenNotifier2D" type="VisibleOnScreenNotifier2D" parent="."]
|
||||
position = Vector2(0, 2.38419e-07)
|
||||
@@ -51,3 +51,20 @@ damage = NodePath("../DamageComponent")
|
||||
script = ExtResource("6_64yur")
|
||||
visibility_notifier = NodePath("../VisibleOnScreenNotifier2D")
|
||||
root = NodePath("..")
|
||||
|
||||
[node name="LaunchComponent" type="Node2D" parent="." node_paths=PackedStringArray("root")]
|
||||
script = ExtResource("7_hulun")
|
||||
root = NodePath("..")
|
||||
speed = 200.0
|
||||
metadata/_custom_type_script = "uid://873un8agkyja"
|
||||
|
||||
[node name="StraightMotionComponent" type="Node" parent="." node_paths=PackedStringArray("root", "launch_component")]
|
||||
script = ExtResource("8_kift8")
|
||||
root = NodePath("..")
|
||||
launch_component = NodePath("../LaunchComponent")
|
||||
metadata/_custom_type_script = "uid://cvcnfrr1udco5"
|
||||
|
||||
[node name="ProjectileInitComponent" type="Node" parent="." node_paths=PackedStringArray("launch_component")]
|
||||
script = ExtResource("9_5ybdf")
|
||||
launch_component = NodePath("../LaunchComponent")
|
||||
metadata/_custom_type_script = "uid://bgty7040ams6s"
|
||||
|
@@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=8 format=3 uid="uid://bcmx07k12gcsc"]
|
||||
[gd_scene load_steps=11 format=3 uid="uid://bcmx07k12gcsc"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://djifxc5x0dyrw" path="res://sprites/ppc_tileset.png" id="1_xusxl"]
|
||||
[ext_resource type="Script" uid="uid://cdnwrn8v05qhi" path="res://scripts/components/bullet_component.gd" id="2_ilnf5"]
|
||||
@@ -6,11 +6,14 @@
|
||||
[ext_resource type="Resource" uid="uid://02l4nbnf2aft" path="res://resources/status_effect/ice.tres" id="4_da7hn"]
|
||||
[ext_resource type="Script" uid="uid://d3brcje121krs" path="res://scripts/components/effect_inflictor_component.gd" id="5_x7vqb"]
|
||||
[ext_resource type="Script" uid="uid://1tnr46o1ib4u" path="res://scripts/components/out_of_screen_component.gd" id="6_7tdxt"]
|
||||
[ext_resource type="Script" uid="uid://cvcnfrr1udco5" path="res://scripts/components/straight_motion_component.gd" id="7_22hnt"]
|
||||
[ext_resource type="Script" uid="uid://873un8agkyja" path="res://scripts/components/launch_component.gd" id="8_xvjl0"]
|
||||
[ext_resource type="Script" uid="uid://bgty7040ams6s" path="res://scripts/components/projectile_init_component.gd" id="9_xvjl0"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_ar0xf"]
|
||||
size = Vector2(16, 10)
|
||||
|
||||
[node name="Brick" type="Area2D"]
|
||||
[node name="IceBrick" type="Area2D"]
|
||||
collision_layer = 16
|
||||
collision_mask = 9
|
||||
|
||||
@@ -23,13 +26,10 @@ hframes = 12
|
||||
vframes = 12
|
||||
frame = 80
|
||||
|
||||
[node name="BulletComponent" type="Node" parent="." node_paths=PackedStringArray("root", "area2d", "timer")]
|
||||
[node name="BulletComponent" type="Node" parent="." node_paths=PackedStringArray("root", "area2d")]
|
||||
script = ExtResource("2_ilnf5")
|
||||
root = NodePath("..")
|
||||
speed = 250.0
|
||||
area2d = NodePath("..")
|
||||
life_time = 2.0
|
||||
timer = NodePath("../Timer")
|
||||
|
||||
[node name="VisibleOnScreenNotifier2D" type="VisibleOnScreenNotifier2D" parent="."]
|
||||
position = Vector2(0, 2.38419e-07)
|
||||
@@ -51,3 +51,20 @@ damage = NodePath("../DamageComponent")
|
||||
script = ExtResource("6_7tdxt")
|
||||
visibility_notifier = NodePath("../VisibleOnScreenNotifier2D")
|
||||
root = NodePath("..")
|
||||
|
||||
[node name="StraightMotionComponent" type="Node" parent="." node_paths=PackedStringArray("root", "launch_component")]
|
||||
script = ExtResource("7_22hnt")
|
||||
root = NodePath("..")
|
||||
launch_component = NodePath("../LaunchComponent")
|
||||
metadata/_custom_type_script = "uid://cvcnfrr1udco5"
|
||||
|
||||
[node name="LaunchComponent" type="Node2D" parent="." node_paths=PackedStringArray("root")]
|
||||
script = ExtResource("8_xvjl0")
|
||||
root = NodePath("..")
|
||||
speed = 170.0
|
||||
metadata/_custom_type_script = "uid://873un8agkyja"
|
||||
|
||||
[node name="ProjectileInitComponent" type="Node" parent="." node_paths=PackedStringArray("launch_component")]
|
||||
script = ExtResource("9_xvjl0")
|
||||
launch_component = NodePath("../LaunchComponent")
|
||||
metadata/_custom_type_script = "uid://bgty7040ams6s"
|
||||
|
Reference in New Issue
Block a user