Public repository for MUR pre alpha
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
1022 B

  1. extends Node
  2. class_name TracksFactory
  3. const START = "Start"
  4. const STRAIGHT = "StraightLong"
  5. const STRAIGHT_SMALL = "Straight"
  6. const CURVE_RIGHT = "CornerLarge"
  7. const CURVE_LEFT = "CornerLargeFlipped"
  8. const CURVE_LARGE_RIGHT = "CornerLarger"
  9. const CURVE_LARGE_LEFT = "CornerLargerFlipped"
  10. const CURVE_SMALL_RIGHT = "CornerSmall"
  11. const CURVE_SMALL_LEFT = "CornerSmallFlipped"
  12. const BUMP = "StraightLongBump"
  13. const BUMP_SMALL = "Bump"
  14. const SKEW_RIGHT = "StraightSkew"
  15. const SKEW_LEFT = "StraightSkewFlipped"
  16. const RAMP_UP = "RampLong"
  17. const RAMP_DOWN = "RampLongFlipped"
  18. const RAMP_CURVED_UP = "RampLongCurved"
  19. const RAMP_CURVED_DOWN = "RampLongCurvedFlipped"
  20. const RAMP_SMALL_UP = "Ramp"
  21. const RAMP_SMALL_DOWN = "RampFlipped"
  22. const CURVED_RIGHT = "CurvedFlipped"
  23. const CURVED_LEFT = "Curved"
  24. const LOOP = "Loop"
  25. func get_road_instance(road):
  26. var instance = load("res://scenes/road/road" + road + ".tscn").instance()
  27. if !instance.get_script():
  28. instance.set_script(load("res://scripts/road/road.gd"))
  29. return instance