2020-01-28 15:35:08 +01:00
|
|
|
extends StaticBody
|
|
|
|
class_name Key
|
2019-11-18 18:16:46 +01:00
|
|
|
|
|
|
|
export(int) var key_id
|
|
|
|
|
2019-12-14 21:05:09 +01:00
|
|
|
onready var outline = get_node("KeyMesh/Outline") as MeshInstance
|
|
|
|
|
2019-11-18 18:16:46 +01:00
|
|
|
|
|
|
|
func do_interact(var player):
|
|
|
|
player.key_chain.append(key_id)
|
2020-01-28 15:35:08 +01:00
|
|
|
queue_free()
|
|
|
|
|
|
|
|
|
|
|
|
func is_class(type): return type == "Key" or .is_class(type)
|
|
|
|
|
|
|
|
|
|
|
|
func get_class(): return "Key"
|