Fixed Typos
This commit is contained in:
@ -9,6 +9,7 @@ size = Vector3(0.0746536, 0.0574341, 0.116943)
|
|||||||
[node name="StaticBody3D" type="StaticBody3D"]
|
[node name="StaticBody3D" type="StaticBody3D"]
|
||||||
collision_layer = 4
|
collision_layer = 4
|
||||||
script = ExtResource("1_biiwx")
|
script = ExtResource("1_biiwx")
|
||||||
|
promt_message = "Pick Up Key"
|
||||||
|
|
||||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.000476837, 0.0148621, -0.0220947)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.000476837, 0.0148621, -0.0220947)
|
||||||
|
|||||||
@ -11,7 +11,7 @@ func _physics_process(delta):
|
|||||||
if is_colliding():
|
if is_colliding():
|
||||||
var collider = get_collider()
|
var collider = get_collider()
|
||||||
if collider:
|
if collider:
|
||||||
prompt.text = collider.promt_message
|
prompt.text = collider.prompt_message
|
||||||
if Input.is_action_just_pressed("interact"):
|
if Input.is_action_just_pressed("interact"):
|
||||||
collider.interact(owner)
|
collider.interact(owner)
|
||||||
|
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
class_name Interactable
|
class_name Interactable
|
||||||
extends StaticBody3D
|
extends StaticBody3D
|
||||||
|
|
||||||
@export var promt_message:String = "press e"
|
@export var prompt_message:String = "Press e"
|
||||||
@export var promt_key:String
|
@export var prompt_key:String
|
||||||
|
|
||||||
func interact(player):
|
func interact(player):
|
||||||
pass
|
pass
|
||||||
Reference in New Issue
Block a user