Hellswipers/game/icons.gd

27 lines
409 B
GDScript3
Raw Permalink Normal View History

2024-03-14 17:39:20 +00:00
extends Node2D
@onready var player := $AnimationPlayer
@onready var main_icon := $Icon
@onready var icons := [
$Icon1,
$Icon2,
$Icon3,
$Icon4,
$Icon5,
$Icon6,
$Icon7,
$Icon8
]
func update(main, queue) -> void:
if main != null:
player.play('round-change')
await player.animation_finished
main_icon.texture = main
for i in range(8):
icons[i].texture = queue[i][1]
player.play('RESET')