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.
33 lines
1022 B
33 lines
1022 B
extends Node
|
|
|
|
class_name TracksFactory
|
|
|
|
const START = "Start"
|
|
const STRAIGHT = "StraightLong"
|
|
const STRAIGHT_SMALL = "Straight"
|
|
const CURVE_RIGHT = "CornerLarge"
|
|
const CURVE_LEFT = "CornerLargeFlipped"
|
|
const CURVE_LARGE_RIGHT = "CornerLarger"
|
|
const CURVE_LARGE_LEFT = "CornerLargerFlipped"
|
|
const CURVE_SMALL_RIGHT = "CornerSmall"
|
|
const CURVE_SMALL_LEFT = "CornerSmallFlipped"
|
|
const BUMP = "StraightLongBump"
|
|
const BUMP_SMALL = "Bump"
|
|
const SKEW_RIGHT = "StraightSkew"
|
|
const SKEW_LEFT = "StraightSkewFlipped"
|
|
const RAMP_UP = "RampLong"
|
|
const RAMP_DOWN = "RampLongFlipped"
|
|
const RAMP_CURVED_UP = "RampLongCurved"
|
|
const RAMP_CURVED_DOWN = "RampLongCurvedFlipped"
|
|
const RAMP_SMALL_UP = "Ramp"
|
|
const RAMP_SMALL_DOWN = "RampFlipped"
|
|
const CURVED_RIGHT = "CurvedFlipped"
|
|
const CURVED_LEFT = "Curved"
|
|
const LOOP = "Loop"
|
|
|
|
|
|
func get_road_instance(road):
|
|
var instance = load("res://scenes/road/road" + road + ".tscn").instance()
|
|
if !instance.get_script():
|
|
instance.set_script(load("res://scripts/road/road.gd"))
|
|
return instance
|