extends StaticBody var isplaying = false var anim : AnimationPlayer var parent : Node var game : Spatial var root : Spatial func _ready(): root = get_parent() anim = root.get_node("AnimationPlayer") game = root.get_node("Viewport/FishingGame") pass func interact(relate): if anim.is_playing(): return #var dialog = Dialogic.start("rat_chess") #dialog.connect("dialogic_signal", self, "dialog_listener") #add_child(dialog) #root.interact(relate) if isplaying: isplaying = false anim.play_backwards("start_fishing") else: isplaying = true anim.play("start_fishing") play() #root.currentTask = get_tree().get_nodes_in_group("player")[0] func play(): game.playing = true Spiel.player.lock = true func _input(event): if game.playing: game.forward_input(event) #func dialog_listener(string): #if string == "PLAY": # isplaying = true # root.play()