wild jam prototype

This commit is contained in:
2024-02-24 08:35:47 -06:00
parent e6d1f5a8df
commit bd0e9e21cd
28 changed files with 606 additions and 19 deletions

View File

@@ -7,6 +7,8 @@ class_name HUD
@onready var texture_rect: TextureRect = $PanelContainer/MarginContainer/VBoxContainer/TextureRect
@onready var lives_container: GridContainer = $PanelContainer/MarginContainer/VBoxContainer/LivesContainer
@onready var entity_count_label: Label = $EntityCountContainer/MarginContainer/EntityCountLabel
@onready var rocket_spawned_toast: PanelContainer = $RocketSpawnedToast
@onready var alliance_texture: TextureRect = $PanelContainer/MarginContainer/VBoxContainer/AllianceContainer/MarginContainer/AllianceTexture
const HEART = preload("res://assets/heart.png")
func _on_player_color_changed(color: Color) -> void:
@@ -27,3 +29,19 @@ func _on_player_lives_changed(lives: int) -> void:
func update_entity_count(count: int):
entity_count_label.text = "Entity Count: %s" % count
func rocket_placed() -> void:
rocket_spawned_toast.show()
rocket_spawned_toast.get_node("Timer").start()
func _on_timer_timeout() -> void:
rocket_spawned_toast.hide()
func set_alliance(alliance: Buff.colors) -> void:
match alliance:
Buff.colors.RED:
alliance_texture.modulate = Color.RED
Buff.colors.GREEN:
alliance_texture.modulate = Color.GREEN
Buff.colors.BLUE:
alliance_texture.modulate = Color.BLUE