mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-29 23:41:54 +08:00
14 lines
217 B
GDScript
14 lines
217 B
GDScript
|
|
class_name Watcher
|
||
|
|
|
||
|
|
signal changed()
|
||
|
|
|
||
|
|
var currentState = null
|
||
|
|
|
||
|
|
func _init(initialState):
|
||
|
|
currentState = initialState
|
||
|
|
|
||
|
|
func setState(newState):
|
||
|
|
if newState != currentState:
|
||
|
|
currentState = newState
|
||
|
|
changed.emit()
|