You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
371 B
GDScript
17 lines
371 B
GDScript
extends Node
|
|
|
|
# Event Handler for Learning Knowledge
|
|
|
|
# Signals
|
|
signal learned
|
|
|
|
func bingo(knowledge):
|
|
if knowledge in KnowledgeBase.bingo_knowledge:
|
|
MessageBus.publish("bingo", self)
|
|
|
|
# Handle
|
|
func handle(knowledge):
|
|
if get_tree().get_nodes_in_group("player").size() > 0:
|
|
get_tree().get_nodes_in_group("player")[0].think("Learned: " + knowledge)
|
|
bingo(knowledge)
|