2019-11-18 18:16:46 +01:00
|
|
|
extends StaticBody
|
2020-01-28 15:35:08 +01:00
|
|
|
class_name Keycard
|
2019-11-18 18:16:46 +01:00
|
|
|
|
|
|
|
export(int) var card_lvl
|
|
|
|
|
2019-12-14 21:05:09 +01:00
|
|
|
onready var outline = get_node("KeycardMesh/Outline") as MeshInstance
|
|
|
|
|
2019-11-18 18:16:46 +01:00
|
|
|
|
|
|
|
func do_interact(var player):
|
2019-11-18 18:25:57 +01:00
|
|
|
if card_lvl > player.keycard_lvl:
|
|
|
|
player.keycard_lvl = card_lvl
|
2020-01-28 15:35:08 +01:00
|
|
|
queue_free()
|
|
|
|
|
|
|
|
|
|
|
|
func is_class(type): return type == "Keycard" or .is_class(type)
|
|
|
|
|
|
|
|
|
|
|
|
func get_class(): return "Keycard"
|