diff options
Diffstat (limited to 'Scenes/PlateKey.gd')
-rw-r--r-- | Scenes/PlateKey.gd | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Scenes/PlateKey.gd b/Scenes/PlateKey.gd index 1342469..aa3bb8b 100644 --- a/Scenes/PlateKey.gd +++ b/Scenes/PlateKey.gd @@ -1,13 +1,18 @@ extends Plate export(NodePath) var crystal_path +export(Color) var active_color onready var crystal : Crystal = get_node(crystal_path) setget set_crystal +onready var mesh : MeshInstance = $Mesh func activate(entity : Entity, dungeon): if crystal == null or crystal.is_active: return + var material = mesh.get_active_material(0) + material.albedo_color = active_color + crystal.add_action("cor_activate", [0.2]) func set_crystal(value : Crystal): |