Added Night stand animation to open and close when interacted with and fixed interaction ray so I don't have to use classes and I can just have it use the intractable physics layer
This commit is contained in:
13
Assets/scripts/night_stand.gd
Normal file
13
Assets/scripts/night_stand.gd
Normal file
@ -0,0 +1,13 @@
|
||||
extends StaticBody3D
|
||||
|
||||
@export var promt_message:String = "press e"
|
||||
@export var promt_key:String
|
||||
var is_open = false
|
||||
|
||||
func interact(player):
|
||||
if not is_open:
|
||||
$AnimationPlayer.play("Open")
|
||||
is_open = true
|
||||
else:
|
||||
$AnimationPlayer.play("Close")
|
||||
is_open = false
|
||||
Reference in New Issue
Block a user