wonderful sounds and visuals

This commit is contained in:
pennyrigate 2024-06-14 23:20:34 -04:00
parent 828a4ccecc
commit 02793ddc38
21 changed files with 177 additions and 24 deletions

View file

@ -4,6 +4,7 @@ extends "res://maps/map.gd"
onready var sg_health: TextureProgress = $"%SGHealthBar"
onready var sg_energy: TextureProgress = $"%SGEnergyBar"
onready var fami_health: TextureProgress = $"%FamiHealthBar"
onready var laser_ok: TextureRect = $"%LaserOk"
onready var sg2083: KinematicBody2D = $"2083"
onready var famira: Node2D = $Famira
@ -13,15 +14,13 @@ func _ready() -> void:
sg2083.state = sg2083.State.INACTIVE
famira.animation_player.play("grow", -1.0, 0.0)
func _process(delta):
sg_energy.value -= 1
func _on_2083_health_changed(amount) -> void:
sg_health.value = amount
sg_health.value = amount - 4
func _on_Famira_health_changed(amount) -> void:
fami_health.value = amount
fami_health.value = ceil(amount) - 3
func _on_cutscene_finished() -> void:
@ -49,8 +48,14 @@ func start_fight() -> void:
famira.animation_player.state_chart.send_event("transformed")
func _on_2083_energy_changed(amount) -> void:
sg_energy.value = amount
func _on_2083_energy_changed(amount,laser_energy) -> void:
sg_energy.value = amount - 3
#Display heads up of laser status
if amount >= laser_energy:
if !Audio.ac_collectible.is_playing() && $"%LaserOk".visible == false: Audio.play_sound(Audio.a_laser_ready,Audio.ac_collectible)
$"%LaserOk".visible = true
else:
$"%LaserOk".visible = false
func _on_Famira_died() -> void: