Gun now goes invisible wheen you toggle HUD
This commit is contained in:
parent
355a7a2228
commit
943c6bd49c
1 changed files with 10 additions and 0 deletions
|
@ -54,6 +54,16 @@ func run_command(command):
|
|||
HUD.visible = false
|
||||
elif HUD.visible == false:
|
||||
HUD.visible = true
|
||||
toggle_gun()
|
||||
else:
|
||||
Global.consoleOutput = "Unknown cheat code"
|
||||
$output.text = Global.consoleOutput
|
||||
|
||||
func toggle_gun():
|
||||
var map = Global.currentMapNode.get_path()
|
||||
var playerID = Global.teddyAuthorityID
|
||||
var gun = get_node(str(map) + '/' + str(playerID) + '/CollisionShape3D/Neck/Camera3D/Gun')
|
||||
if gun.visible == true:
|
||||
gun.visible = false
|
||||
elif gun.visible == false:
|
||||
gun.visible = true
|
||||
|
|
Loading…
Reference in a new issue