Refactor brick throwing mechanics; integrate new input handling and projectile initialization components
This commit is contained in:
@@ -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