Hi all. I'm nearly done with the code for a game I've been making this past week. Just a few more things to do before I get to spriting, and levels.
I've a Signal called 'game_over', and I'd like to disable the code that listens for Input when the signal fires. The below code is from LazerGun.gd.
const LAZER = preload("res://player-side/EnergyShot.tscn")
const ROTATION_SPEED = 0.5
rotation_Direction = 0.0
rotation_Direction -= 1.0
rotation_Direction += 1.0
var lazershot = LAZER.instance()
rotation += rotation_Direction * ROTATION_SPEED * delta
rotation = clamp(rotation, deg2rad(-45), deg2rad(45))
pass # replace with function body
Again, I'd like to disable the 'getinput()' function when 'gameover' fires. I can figure out how to get the gun working after a game over.