Refactor cutscene queue
This commit is contained in:
26
battle/ui/ActionBox.gd
Normal file
26
battle/ui/ActionBox.gd
Normal file
@@ -0,0 +1,26 @@
|
||||
class_name ActionBox extends GridContainer
|
||||
const BattleMove = preload("res://battle/fighter/BattleMove.gd")
|
||||
|
||||
@export var btnAttack:Button
|
||||
@export var btnMagic:Button
|
||||
@export var btnItem:Button
|
||||
|
||||
signal decisionMade(move:BattleMove)
|
||||
|
||||
func _ready() -> void:
|
||||
btnAttack.pressed.connect(onAttackPressed)
|
||||
btnMagic.pressed.connect(onMagicPressed)
|
||||
btnItem.pressed.connect(onItemPressed)
|
||||
self.visible = false
|
||||
|
||||
func onAttackPressed() -> void:
|
||||
print("Attack button pressed")
|
||||
decisionMade.emit(null)
|
||||
|
||||
func onMagicPressed() -> void:
|
||||
print("Magic button pressed")
|
||||
decisionMade.emit(null)
|
||||
|
||||
func onItemPressed() -> void:
|
||||
print("Item button pressed")
|
||||
decisionMade.emit(null)
|
||||
Reference in New Issue
Block a user