27 lines
409 B
GDScript3
27 lines
409 B
GDScript3
|
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')
|