diff --git a/components/Bullets/BigLaser.tscn b/components/Bullets/BigLaser.tscn index 8e84d1c..72ac295 100644 --- a/components/Bullets/BigLaser.tscn +++ b/components/Bullets/BigLaser.tscn @@ -6,7 +6,3 @@ needEnergy = 100.0 knockback = 10.0 recoil = 4.0 - -[node name="rect" parent="texture" index="0"] -offset_top = 0.0 -offset_bottom = 2000.0 diff --git a/components/Bullets/Common/LaserSummoner.tscn b/components/Bullets/Common/LaserSummoner.tscn index 0ce20e8..1fd5ef7 100644 --- a/components/Bullets/Common/LaserSummoner.tscn +++ b/components/Bullets/Common/LaserSummoner.tscn @@ -207,11 +207,6 @@ height = 2000.0 [node name="LaserSummoner" instance=ExtResource("1_pnxoq")] script = ExtResource("2_nk2p8") -fields = { -0: 0, -1: 25, -2: 1 -} autoSpawnAnimation = true freeAfterSpawn = true diff --git a/components/Bullets/FireScan.tscn b/components/Bullets/FireScan.tscn index 45fd73c..4f0e5b6 100644 --- a/components/Bullets/FireScan.tscn +++ b/components/Bullets/FireScan.tscn @@ -8,11 +8,6 @@ a = Vector2(0, -10) [node name="FireScan" instance=ExtResource("1_cqre5")] script = ExtResource("2_qprdp") -fields = { -0: 20, -1: 40, -2: 0 -} lifeDistance = 200.0 [node name="hitbox" parent="." index="1"] diff --git a/components/Bullets/Laser.tscn b/components/Bullets/Laser.tscn index 9498625..9859bc7 100644 --- a/components/Bullets/Laser.tscn +++ b/components/Bullets/Laser.tscn @@ -17,11 +17,6 @@ height = 300.0 [node name="Laser" instance=ExtResource("1_3u4op")] script = ExtResource("2_yy5sr") -fields = { -0: 10, -1: 15, -2: 1 -} lifeTime = 2000.0 [node name="texture" parent="." index="0"] diff --git a/components/Bullets/Star.tscn b/components/Bullets/Star.tscn index d1fe70f..a90f6ea 100644 --- a/components/Bullets/Star.tscn +++ b/components/Bullets/Star.tscn @@ -62,11 +62,6 @@ radius = 19.2354 [node name="Star" instance=ExtResource("1_x6yf7")] script = ExtResource("2_y4b0l") -fields = { -0: 10, -1: 1, -2: 0 -} lifeTime = 1000.0 autoLoopAnimation = true diff --git a/scripts/Contents/Bullets/Common/LockLauncher.gd b/scripts/Contents/Bullets/Common/LockLauncher.gd deleted file mode 100644 index 2fbf780..0000000 --- a/scripts/Contents/Bullets/Common/LockLauncher.gd +++ /dev/null @@ -1,16 +0,0 @@ -extends BulletBase -class_name LockLauncher - -enum PositionType { - SELF, - TEXTURE, -} - -@export var target: PositionType = PositionType.SELF - -func ai(): - if target == PositionType.SELF: - position = launcher.position - else: - position = launcher.texture.global_position - rotation = launcher.rotation diff --git a/scripts/Contents/Bullets/Diamond.gd b/scripts/Contents/Bullets/Diamond.gd index f3886ad..80fa041 100644 --- a/scripts/Contents/Bullets/Diamond.gd +++ b/scripts/Contents/Bullets/Diamond.gd @@ -8,4 +8,4 @@ func register(): func ai(): rotation = lerp_angle(rotation, position.angle_to_point(launcher.currentFocusedBoss.position), 0.1 * clamp((traceTime - timeLived()) / traceTime, 0, INF)) canDamageSelf = !(timeLived() >= traceTime) - forward(Vector2.from_angle(rotation)) + PresetsAI.forward(self, rotation) diff --git a/scripts/Contents/Bullets/FireScan.gd b/scripts/Contents/Bullets/FireScan.gd index 6a1df4a..71f3151 100644 --- a/scripts/Contents/Bullets/FireScan.gd +++ b/scripts/Contents/Bullets/FireScan.gd @@ -6,4 +6,4 @@ func register(): damage = 20 func ai(): - forward(Vector2.from_angle(rotation)) + PresetsAI.forward(self, rotation) diff --git a/scripts/Contents/Bullets/Presets/Presets.gd b/scripts/Contents/Bullets/Presets/Presets.gd new file mode 100644 index 0000000..fca082f --- /dev/null +++ b/scripts/Contents/Bullets/Presets/Presets.gd @@ -0,0 +1,4 @@ +class_name PresetsAI + +static func forward(bullet: BulletBase, rotation: float): + bullet.forward(Vector2.from_angle(rotation)) diff --git a/scripts/Contents/Bullets/PurpleCrystal.gd b/scripts/Contents/Bullets/PurpleCrystal.gd index a38f4ea..a2894a3 100644 --- a/scripts/Contents/Bullets/PurpleCrystal.gd +++ b/scripts/Contents/Bullets/PurpleCrystal.gd @@ -2,4 +2,4 @@ extends BulletBase class_name PurpleCrystal func ai(): - forward(Vector2.from_angle(rotation)) + PresetsAI.forward(self, rotation) diff --git a/scripts/Contents/Bullets/Star.gd b/scripts/Contents/Bullets/Star.gd index 9bf8478..97c87a5 100644 --- a/scripts/Contents/Bullets/Star.gd +++ b/scripts/Contents/Bullets/Star.gd @@ -4,4 +4,4 @@ class_name Star func register(): damage = 1 func ai(): - forward(Vector2.from_angle(rotation)) + PresetsAI.forward(self, rotation)