Globals.gd 708 B

12345678910111213141516171819202122232425262728293031323334353637
  1. extends Node
  2. const tile_size : int = 32
  3. #@onready var gravity: int = ProjectSettings.get_setting("physics/2d/default_gravity")
  4. const gravity : int = 980
  5. enum Colors
  6. {
  7. WHITE = 17,
  8. RED = 18,
  9. GREEN = 19,
  10. BLUE = 20,
  11. CYAN = 21,
  12. MAGENTA = 22,
  13. YELLOW = 23,
  14. }
  15. func get_color(index : Colors) -> Color:
  16. match index:
  17. Globals.Colors.WHITE:
  18. return Color.WHITE
  19. Globals.Colors.RED:
  20. return Color.RED
  21. Globals.Colors.GREEN:
  22. return Color.GREEN
  23. Globals.Colors.BLUE:
  24. return Color.BLUE
  25. Globals.Colors.CYAN:
  26. return Color.CYAN
  27. Globals.Colors.MAGENTA:
  28. return Color.MAGENTA
  29. Globals.Colors.YELLOW:
  30. return Color.YELLOW
  31. _:
  32. return Color.BLACK