Console can now be turned off or on, off by default
This commit is contained in:
parent
0a76f14556
commit
fc5ffdd8d2
1 changed files with 8 additions and 6 deletions
|
@ -2,18 +2,20 @@ extends Node
|
||||||
|
|
||||||
var scenePlayground = "res://scenes/playground.tscn"
|
var scenePlayground = "res://scenes/playground.tscn"
|
||||||
var sceneTutorial = "res://scenes/tutorial.tscn"
|
var sceneTutorial = "res://scenes/tutorial.tscn"
|
||||||
|
var consoleEnabled = false
|
||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
func _process(delta):
|
func _process(delta):
|
||||||
if not Global.consoleOpen:
|
if consoleEnabled == true:
|
||||||
self.queue_free()
|
if not Global.consoleOpen:
|
||||||
if Input.is_action_just_pressed("console_send"):
|
self.queue_free()
|
||||||
Global.consoleCommand = $consoleEdit.text
|
if Input.is_action_just_pressed("console_send"):
|
||||||
print ("Console command run: ", Global.consoleCommand)
|
Global.consoleCommand = $consoleEdit.text
|
||||||
run_command(Global.consoleCommand)
|
print ("Console command run: ", Global.consoleCommand)
|
||||||
|
run_command(Global.consoleCommand)
|
||||||
|
|
||||||
func run_command(command):
|
func run_command(command):
|
||||||
if command == "tele playground":
|
if command == "tele playground":
|
||||||
|
|
Loading…
Reference in a new issue