terminal ui comes up
This commit is contained in:
parent
40e4281fd4
commit
fada7c657b
4 changed files with 26 additions and 5 deletions
|
|
@ -44,3 +44,8 @@ func open_termimal():
|
|||
Input.mouse_mode = Input.MOUSE_MODE_VISIBLE
|
||||
#display terminal ui
|
||||
pass
|
||||
|
||||
|
||||
func _on_player_object_clicked(object):
|
||||
if(object.name == "Terminal"):
|
||||
open_termimal()
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@ extends CharacterBody3D
|
|||
@export var mouse_sensitivity : float = 0.003 # TODO: this is sketchy check that its framerate independant pls
|
||||
@export var raycast : RayCast3D
|
||||
|
||||
signal object_clicked(object : Node3D)
|
||||
|
||||
const SPEED = 5.0
|
||||
const JUMP_VELOCITY = 4.5
|
||||
|
||||
|
|
@ -31,7 +33,12 @@ func _physics_process(delta):
|
|||
|
||||
# interact with stuff
|
||||
if Input.is_action_just_pressed("interact"):
|
||||
print(raycast.)
|
||||
if "name" in raycast.get_collider():
|
||||
print(raycast.get_collider().name)
|
||||
object_clicked.emit(raycast.get_collider())
|
||||
else:
|
||||
print("womp womp")
|
||||
|
||||
|
||||
# Get the input direction and handle the movement/deceleration.
|
||||
# As good practice, you should replace UI actions with custom gameplay actions.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue