diff --git a/Resources/BossPhases/Rumia_Lasers.tres b/Resources/BossPhases/Rumia_Lasers.tres index 26e9282e..c1144027 100644 --- a/Resources/BossPhases/Rumia_Lasers.tres +++ b/Resources/BossPhases/Rumia_Lasers.tres @@ -31,6 +31,8 @@ LethalTime = 4.0 PreFireColor = Color(0, 0, 1, 0.501961) LethalColor = Color(0, 0, 1, 1) BulletScene = ExtResource("1_nfjet") +_bulletLifeTime = 20.0 +_destroyOnCollision = false bulletSpeed = 40.0 bulletCount = 8 rotationSpeed = 0.0 @@ -55,6 +57,8 @@ Continuous = false [sub_resource type="Resource" id="Resource_7tuk4"] script = ExtResource("2_peiit") BulletScene = ExtResource("4_7kssw") +_bulletLifeTime = 20.0 +_destroyOnCollision = false bulletSpeed = 40.0 bulletCount = 16 rotationSpeed = 0.0 @@ -79,6 +83,8 @@ Continuous = false [sub_resource type="Resource" id="Resource_reykq"] script = ExtResource("2_peiit") BulletScene = ExtResource("4_7kssw") +_bulletLifeTime = 20.0 +_destroyOnCollision = false bulletSpeed = 40.0 bulletCount = 16 rotationSpeed = 0.0 diff --git a/Resources/BossPhases/Rumia_NS2.tres b/Resources/BossPhases/Rumia_NS2.tres index 7759a331..cf02fda3 100644 --- a/Resources/BossPhases/Rumia_NS2.tres +++ b/Resources/BossPhases/Rumia_NS2.tres @@ -22,6 +22,8 @@ Continuous = false [sub_resource type="Resource" id="Resource_puvpt"] script = ExtResource("2_wkmhk") BulletScene = ExtResource("1_as8n2") +_bulletLifeTime = 20.0 +_destroyOnCollision = false bulletSpeed = 20.0 bulletCount = 20 rotationSpeed = 0.0 @@ -46,6 +48,8 @@ Continuous = false [sub_resource type="Resource" id="Resource_44j24"] script = ExtResource("2_wkmhk") BulletScene = ExtResource("1_as8n2") +_bulletLifeTime = 20.0 +_destroyOnCollision = false bulletSpeed = 20.0 bulletCount = 20 rotationSpeed = 0.0 @@ -63,6 +67,8 @@ WaitForCompletion = true [sub_resource type="Resource" id="Resource_wkxow"] script = ExtResource("2_wkmhk") BulletScene = ExtResource("4_tek7n") +_bulletLifeTime = 20.0 +_destroyOnCollision = false bulletSpeed = 20.0 bulletCount = 20 rotationSpeed = 0.0 @@ -80,6 +86,8 @@ WaitForCompletion = false [sub_resource type="Resource" id="Resource_gcqck"] script = ExtResource("2_wkmhk") BulletScene = ExtResource("4_tek7n") +_bulletLifeTime = 20.0 +_destroyOnCollision = false bulletSpeed = 20.0 bulletCount = 20 rotationSpeed = 0.0 @@ -97,6 +105,8 @@ WaitForCompletion = true [sub_resource type="Resource" id="Resource_bxbto"] script = ExtResource("2_wkmhk") BulletScene = ExtResource("5_n4xqo") +_bulletLifeTime = 20.0 +_destroyOnCollision = false bulletSpeed = 20.0 bulletCount = 20 rotationSpeed = 0.0 @@ -114,6 +124,8 @@ WaitForCompletion = false [sub_resource type="Resource" id="Resource_q48s1"] script = ExtResource("2_wkmhk") BulletScene = ExtResource("5_n4xqo") +_bulletLifeTime = 20.0 +_destroyOnCollision = false bulletSpeed = 20.0 bulletCount = 20 rotationSpeed = 0.0 @@ -161,6 +173,8 @@ Continuous = false [sub_resource type="Resource" id="Resource_mpjrl"] script = ExtResource("2_wkmhk") BulletScene = ExtResource("7_gsnyb") +_bulletLifeTime = 20.0 +_destroyOnCollision = false bulletSpeed = 80.0 bulletCount = 12 rotationSpeed = 0.0 @@ -187,6 +201,8 @@ WaitForCompletion = true [sub_resource type="Resource" id="Resource_ncfnl"] script = ExtResource("2_wkmhk") BulletScene = ExtResource("7_gsnyb") +_bulletLifeTime = 20.0 +_destroyOnCollision = false bulletSpeed = 80.0 bulletCount = 12 rotationSpeed = 0.0 @@ -213,6 +229,8 @@ WaitForCompletion = true [sub_resource type="Resource" id="Resource_vkthc"] script = ExtResource("2_wkmhk") BulletScene = ExtResource("7_gsnyb") +_bulletLifeTime = 20.0 +_destroyOnCollision = false bulletSpeed = 80.0 bulletCount = 12 rotationSpeed = 0.0 @@ -239,6 +257,8 @@ WaitForCompletion = true [sub_resource type="Resource" id="Resource_n2gn4"] script = ExtResource("2_wkmhk") BulletScene = ExtResource("7_gsnyb") +_bulletLifeTime = 20.0 +_destroyOnCollision = false bulletSpeed = 80.0 bulletCount = 12 rotationSpeed = 0.0 diff --git a/Resources/BossPhases/Rumia_SP1.tres b/Resources/BossPhases/Rumia_SP1.tres index 380756a7..44ea1711 100644 --- a/Resources/BossPhases/Rumia_SP1.tres +++ b/Resources/BossPhases/Rumia_SP1.tres @@ -27,6 +27,8 @@ ScalingFactor = 10.0 [sub_resource type="Resource" id="Resource_0v4v8"] script = ExtResource("2_7268a") BulletScene = ExtResource("1_o4um1") +_bulletLifeTime = 20.0 +_destroyOnCollision = false bulletSpeed = 80.0 bulletCount = 12 rotationSpeed = 0.0 @@ -53,6 +55,8 @@ ScalingFactor = 10.0 [sub_resource type="Resource" id="Resource_7yi74"] script = ExtResource("2_7268a") BulletScene = ExtResource("4_ruawj") +_bulletLifeTime = 20.0 +_destroyOnCollision = false bulletSpeed = 80.0 bulletCount = 12 rotationSpeed = 0.0 diff --git a/Resources/Patterns/rumia_ns_1_spiralized.tres b/Resources/Patterns/rumia_ns_1_spiralized.tres index f923978a..afe40000 100644 --- a/Resources/Patterns/rumia_ns_1_spiralized.tres +++ b/Resources/Patterns/rumia_ns_1_spiralized.tres @@ -11,6 +11,8 @@ decreaseRate = 4.0 [resource] script = ExtResource("3_ryait") BulletScene = ExtResource("1_iwsrv") +_bulletLifeTime = 20.0 +_destroyOnCollision = false bulletSpeed = 70.0 bulletCount = 10 rotationSpeed = 0.0 diff --git a/Resources/Patterns/rumia_ns_2.tres b/Resources/Patterns/rumia_ns_2.tres index 6cc653d8..1e59a8a8 100644 --- a/Resources/Patterns/rumia_ns_2.tres +++ b/Resources/Patterns/rumia_ns_2.tres @@ -8,6 +8,8 @@ [sub_resource type="Resource" id="Resource_ne4q3"] script = ExtResource("2_ee42k") BulletScene = ExtResource("1_4xpdn") +_bulletLifeTime = 20.0 +_destroyOnCollision = false bulletSpeed = 40.0 bulletCount = 10 rotationSpeed = 120.0 @@ -25,6 +27,8 @@ WaitForCompletion = true [sub_resource type="Resource" id="Resource_kohuh"] script = ExtResource("2_ee42k") BulletScene = ExtResource("3_gr7a3") +_bulletLifeTime = 20.0 +_destroyOnCollision = false bulletSpeed = 50.0 bulletCount = 16 rotationSpeed = 60.0 @@ -42,6 +46,8 @@ WaitForCompletion = true [sub_resource type="Resource" id="Resource_depjj"] script = ExtResource("2_ee42k") BulletScene = ExtResource("1_4xpdn") +_bulletLifeTime = 20.0 +_destroyOnCollision = false bulletSpeed = 50.0 bulletCount = 10 rotationSpeed = 60.0 diff --git a/Scenes/test.tscn b/Scenes/test.tscn index 4e2e6bed..293941ee 100644 --- a/Scenes/test.tscn +++ b/Scenes/test.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=74 format=4 uid="uid://bv451a8wgty4u"] +[gd_scene load_steps=75 format=4 uid="uid://bv451a8wgty4u"] [ext_resource type="Script" path="res://Scripts/GameManager.cs" id="1_8tmoj"] [ext_resource type="PackedScene" uid="uid://bghghp5ep4w2j" path="res://Scenes/player.tscn" id="2_8mh54"] @@ -122,6 +122,12 @@ ActivationType = 0 Targets = Array[NodePath]([NodePath("../Rumia")]) WaitForCompletion = true +[sub_resource type="Resource" id="Resource_sf3bq"] +resource_local_to_scene = true +script = ExtResource("49_0si7g") +Target = NodePath(".") +WaitForCompletion = true + [node name="GameScene" type="Node2D" node_paths=PackedStringArray("PlayerSpawnMarker")] position = Vector2(38, 39) script = ExtResource("1_8tmoj") @@ -580,7 +586,7 @@ Events = Array[Object]([SubResource("Resource_068l7"), SubResource("Resource_l3n [node name="BossBattleStartScript" parent="." instance=ExtResource("43_kf3qc")] position = Vector2(-1487, -396) -Events = Array[Object]([SubResource("Resource_4f4id"), SubResource("Resource_s2o7m"), SubResource("Resource_b1dht"), SubResource("Resource_xrgpy")]) +Events = Array[Object]([SubResource("Resource_4f4id"), SubResource("Resource_s2o7m"), SubResource("Resource_b1dht"), SubResource("Resource_xrgpy"), SubResource("Resource_sf3bq")]) [node name="Enemy8" parent="." instance=ExtResource("47_u1ve6")] position = Vector2(-968, 206) diff --git a/Scripts/AttackPatterns/SpiralPattern.cs b/Scripts/AttackPatterns/SpiralPattern.cs index d396a821..d817b651 100644 --- a/Scripts/AttackPatterns/SpiralPattern.cs +++ b/Scripts/AttackPatterns/SpiralPattern.cs @@ -13,6 +13,8 @@ namespace Cirno.Scripts.AttackPatterns; public partial class SpiralPattern : AttackPattern { [Export] public PackedScene BulletScene; + [Export] private float _bulletLifeTime = 20f; + [Export] private bool _destroyOnCollision = false; [Export] private float bulletSpeed = 5f; [Export] private int bulletCount = 16; [Export] private float rotationSpeed = 0f; @@ -89,6 +91,8 @@ public partial class SpiralPattern : AttackPattern { Position = position, Direction = direction, + LifeTime = _bulletLifeTime, + DestroyOnCollision = _destroyOnCollision, Speed = bulletSpeed, Owner = owner, DamageType = _damageType,