feat: add interactable base script
This commit is contained in:
10
ruf-der-pilze/scripts/interactable.gd
Normal file
10
ruf-der-pilze/scripts/interactable.gd
Normal file
@@ -0,0 +1,10 @@
|
||||
# Base class for all interactable objects in the world.
|
||||
# Attach to a StaticBody3D or Area3D that has a CollisionShape3D.
|
||||
# Override interact() in subclasses.
|
||||
class_name Interactable
|
||||
extends Node3D
|
||||
|
||||
## Called when a player interacts with this object.
|
||||
## peer_id is the NetworkManager.my_id of the interacting player.
|
||||
func interact(_peer_id: int) -> void:
|
||||
pass
|
||||
Reference in New Issue
Block a user