VisualCell.gd 305 B

1234567891011121314151617181920
  1. extends ColorRect
  2. class_name VisualCell
  3. onready var GRID = find_parent("GRID")
  4. var colors = {
  5. CellType.types.ROOM: Color8(0,255,0),
  6. CellType.types.CORRIDOR: Color8(255,0,255),
  7. }
  8. var cell
  9. func update_color():
  10. if cell:
  11. color = colors[cell.type.type_index]
  12. #func _process(delta):
  13. # update_color()