forked from funnymemellama/funnymemellama
New debugging stuff
Made player "ball" smaller and closer Added key overlay Added F1 to toggle "Mapentities"
This commit is contained in:
parent
d4becae392
commit
dabd5253ad
5 changed files with 57 additions and 5 deletions
17
Debug.gd
Normal file
17
Debug.gd
Normal file
|
@ -0,0 +1,17 @@
|
|||
extends Node
|
||||
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
pass
|
||||
|
||||
|
||||
func _input(event: InputEvent):
|
||||
if event is InputEventKey:
|
||||
if event.keycode == KEY_F1 and not event.pressed:
|
||||
$Mapentities.visible = not $Mapentities.visible
|
15
KeyOverlay.gd
Normal file
15
KeyOverlay.gd
Normal file
|
@ -0,0 +1,15 @@
|
|||
extends Label
|
||||
|
||||
var keys = []
|
||||
|
||||
func _input(event):
|
||||
if event is InputEventKey:
|
||||
var key = OS.get_keycode_string(event.key_label)
|
||||
if event.pressed:
|
||||
if not keys.has(key):
|
||||
keys.append(key)
|
||||
else:
|
||||
if keys.has(key):
|
||||
keys.erase(key)
|
||||
|
||||
text = ' '.join(keys)
|
|
@ -63,8 +63,7 @@ func _physics_process(delta):
|
|||
|
||||
move_and_slide()
|
||||
|
||||
$Ball.global_position = camera.global_position - camera.global_transform.basis.z * 5.0
|
||||
|
||||
$Ball.global_position = camera.global_position - camera.global_transform.basis.z * 2.0
|
||||
|
||||
func _input(event):
|
||||
if event.is_action_pressed("pause"):
|
||||
|
|
|
@ -23,4 +23,4 @@ current = true
|
|||
size = 6.683
|
||||
|
||||
[node name="Ball" type="CSGSphere3D" parent="."]
|
||||
radius = 0.2
|
||||
radius = 0.1
|
||||
|
|
25
world.tscn
25
world.tscn
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue