global_enums.gd 712 B

123456789101112131415161718192021222324252627282930
  1. func test():
  2. var type: Variant.Type
  3. type = Variant.Type.TYPE_INT
  4. print(type)
  5. type = TYPE_FLOAT
  6. print(type)
  7. var direction: ClockDirection
  8. direction = ClockDirection.CLOCKWISE
  9. print(direction)
  10. direction = COUNTERCLOCKWISE
  11. print(direction)
  12. var duper := Duper.new()
  13. duper.set_type(Variant.Type.TYPE_INT)
  14. duper.set_type(TYPE_FLOAT)
  15. duper.set_direction(ClockDirection.CLOCKWISE)
  16. duper.set_direction(COUNTERCLOCKWISE)
  17. class Super:
  18. func set_type(type: Variant.Type) -> void:
  19. print(type)
  20. func set_direction(dir: ClockDirection) -> void:
  21. print(dir)
  22. class Duper extends Super:
  23. func set_type(type: Variant.Type) -> void:
  24. print(type)
  25. func set_direction(dir: ClockDirection) -> void:
  26. print(dir)