3D to 2D
This commit is contained in:
parent
93b7f1c39c
commit
bf55dcac65
5 changed files with 82 additions and 46 deletions
2
scripts/Desktop.gd
Normal file
2
scripts/Desktop.gd
Normal file
|
@ -0,0 +1,2 @@
|
|||
class_name Interactable
|
||||
extends StaticBody3D
|
11
scripts/PlayerInteraction.gd
Normal file
11
scripts/PlayerInteraction.gd
Normal file
|
@ -0,0 +1,11 @@
|
|||
extends RayCast3D
|
||||
|
||||
@onready var prompt := $Label
|
||||
|
||||
func _physics_process(_delta):
|
||||
prompt.set_text("")
|
||||
if is_colliding():
|
||||
if get_collider() is Interactable:
|
||||
prompt.set_text("Regarder un film sur www3.yggtorrent.qa")
|
||||
if Input.is_mouse_button_pressed(MOUSE_BUTTON_LEFT):
|
||||
get_tree().change_scene_to_file("res://Scenes/menu/go_in.tscn")
|
Reference in a new issue