21 lines
No EOL
735 B
GDScript
21 lines
No EOL
735 B
GDScript
extends "res://Systems/StateMachine/ChessGameState.gd"
|
|
|
|
|
|
|
|
func enter(_previous: String, _data := {}) -> void:
|
|
# finished.emit(Constants.APPLY_CARD_EFFECTS)
|
|
print("ENTERING STATE ", Constants.ATTACH_CARDS)
|
|
if !game.boardContainer.is_connected("card_pressed", handleCardPressed):
|
|
print("Connecting card_pressed signal")
|
|
game.boardContainer.connect("card_pressed", handleCardPressed)
|
|
|
|
|
|
func exit() -> void:
|
|
if game.boardContainer.is_connected("card_pressed", handleCardPressed):
|
|
game.boardContainer.disconnect("card_pressed", handleCardPressed)
|
|
|
|
|
|
func handleCardPressed(location: String) -> void:
|
|
print("HANDLING MOVEMENT ", location)
|
|
var node = game.get_node("Flow/" + location)
|
|
|