Arcade racing demo got Godot 3.3
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.
|
- extends Position2D
-
-
- export var max_length : int = 100 setget _set_max_length
- export var distance_between_points : float = 10 setget _set_distance_between_points
- export var width : float = 2 setget _set_width
- export (Curve) var width_curve = null setget _set_width_curve
- export (Color) var default_color = Color("6680ff") setget _set_default_color
-
-
- onready var trailline_node = $TrailLine
-
-
- func _set_max_length(l : int) -> void:
- if l > 0:
- max_length = l
- if trailline_node:
- trailline_node.max_length = max_length
-
-
- func _set_distance_between_points(d : float) -> void:
- if d > 0.0:
- distance_between_points = d
- if trailline_node:
- trailline_node.distance_between_points = distance_between_points
-
- func _set_width(w : float) -> void:
- if w > 0:
- width = w
- if trailline_node:
- trailline_node.width = w
-
- func _set_width_curve(c) -> void:
- width_curve = c
- if trailline_node:
- trailline_node.width_curve = c
-
- func _set_default_color(c : Color) -> void:
- default_color = c
- if trailline_node:
- trailline_node.default_color = c
-
- func _ready():
- trailline_node.max_length = max_length
- trailline_node.distance_between_points = distance_between_points
- trailline_node.width = width
- trailline_node.width_curve = width_curve
- trailline_node.default_color = default_color
-
-
-
|