Added more shot sounds. Minor fixes

This commit is contained in:
2026-01-04 20:24:19 +03:00
parent 5bd04f131e
commit 6f76be3c21
18 changed files with 157 additions and 18 deletions
@@ -17,8 +17,9 @@ func _ready() -> void:
func shoot(ship_velocity: Vector2) -> bool:
var is_shot := super.shoot(ship_velocity)
if is_shot:
sprite.play(SHOT_ANIMATION)
_can_shoot = false
SoundManager.play_sfx_stream(SoundManager.sfx_weapon_cannon_shot, global_position)
sprite.play(SHOT_ANIMATION)
cooldown_timer.start()
front_particles.restart()
left_particles.restart()
@@ -12,8 +12,9 @@ func _ready() -> void:
func shoot(ship_velocity: Vector2) -> bool:
var is_shot := super.shoot(ship_velocity)
if is_shot:
sprite.play(SHOT_ANIMATION)
_can_shoot = false
SoundManager.play_sfx_stream(SoundManager.sfx_weapon_plasma_shot, global_position)
sprite.play(SHOT_ANIMATION)
cooldown_timer.start()
return is_shot
@@ -57,8 +57,9 @@ script = ExtResource("2_hxkfe")
projectile_scene = ExtResource("3_hxkfe")
[node name="AnimatedSprite2D" parent="." index="0"]
position = Vector2(7, 0)
sprite_frames = SubResource("SpriteFrames_hxkfe")
animation = &"shot"
animation = &"reloading"
[node name="Muzzle" parent="." index="2"]
position = Vector2(1, 2)
position = Vector2(8, 2)
@@ -12,8 +12,9 @@ func _ready() -> void:
func shoot(ship_velocity: Vector2) -> bool:
var is_shot := super.shoot(ship_velocity)
if is_shot:
sprite.play(SHOT_ANIMATION)
_can_shoot = false
SoundManager.play_sfx_stream(SoundManager.sfx_weapon_railgun_shot, global_position)
sprite.play(SHOT_ANIMATION)
return is_shot
@@ -15,8 +15,9 @@ func _ready() -> void:
func shoot(ship_velocity: Vector2) -> bool:
var is_shot := super.shoot(ship_velocity)
if is_shot:
sprite.play(SHOT_ANIMATION)
_can_shoot = false
SoundManager.play_sfx_stream(SoundManager.sfx_weapon_sharapnel_shot, global_position)
sprite.play(SHOT_ANIMATION)
cooldown_timer.start()
shot_particles.restart()
shell_particles.emit_particle(Transform2D(), Vector2(), Color(), Color(), 0)
+2 -1
View File
@@ -30,7 +30,8 @@ func _physics_process(delta: float) -> void:
_current_progress += delta
_update_progress_indicator()
if _current_progress >= passage_data.length:
completed.emit()
if enemy_swamp_controller.get_enemy_count() == 0:
completed.emit()
func _set_passage_data(new_data: PassageData) -> void: