#130 asked for the hull to break away from the fleet, drift a few metres, and go up further off with something more explosive than a light animation. The wreck is a separate node rather than the Ship staying alive to animate, and that is the load-bearing part. A dying Ship still in the tree is still an Area2D in the player_ships group with live weapon components - it would keep firing, keep being fired at, keep counting as a target, and keep colliding on the way out. So the ship's own lifecycle is untouched: it leaves the fleet, emits destroyed, and is freed on exactly the frame it always was. What is left behind is scenery, and the test pins that. The explosion at the end was also the quieter of the two the game has. Killing an enemy was made deliberately loud by #87 while losing one of your own kept the base class's twelve-particle default - the reward louder than the loss. It is now the bigger of the two. #135 is the same scene from the other end: the prologue's convoy flies its escorts on the corners of the box, which is the exposed part of it, and the debris belt can take all four. With no interceptor left, the only hulls the vortex could spare were holds, and the player flew out of the prologue in a carrier. Two guards now: one interceptor is put back into the convoy at the top of the vortex, where a vessel appearing among ten being thrown around a black hole is not something anyone will catch; and the handover checks the TYPES it hands over rather than only the count - one surviving carrier is also a fleet of one, and it is not the fleet a new game starts with.
25 lines
883 B
GDScript
25 lines
883 B
GDScript
class_name ShipExplosionVFX
|
|
extends LightBurstVFX
|
|
|
|
|
|
func _init() -> void:
|
|
# #130: "a rather more explosive explosion than just a light animation".
|
|
# This used to take the base class's defaults - 12 particles, half a
|
|
# second, no shockwave - which made losing one of your own vessels a
|
|
# quieter event on screen than killing an enemy, whose explosion #87
|
|
# had already been told to be the loudest thing in the frame. Now it is
|
|
# the louder of the two, which is the right way round: the enemy's is a
|
|
# reward, this one is a loss.
|
|
color = Color(0.25, 0.85, 1.0)
|
|
particle_count = 30
|
|
lifetime = 0.8
|
|
min_speed = 150.0
|
|
max_speed = 540.0
|
|
shockwave_radius = 120.0
|
|
shockwave_color = Color(0.6, 0.95, 1.0)
|
|
|
|
|
|
static func spawn(parent: Node, world_position: Vector2) -> void:
|
|
var vfx: ShipExplosionVFX = ShipExplosionVFX.new()
|
|
vfx.position = world_position
|
|
parent.add_child(vfx)
|