adds track parser from txt files
This commit is contained in:
@@ -1,22 +1,23 @@
|
||||
extends Path2D
|
||||
|
||||
enum { UP, RIGHT, DOWN, LEFT }
|
||||
const TRACK_TILES = Global.TRACKS[0]
|
||||
|
||||
var tile_size : int = 128
|
||||
var half_size : int = tile_size / 2
|
||||
onready var map = get_node("../TileMap/")
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
_build_track(TRACK_TILES)
|
||||
var track = TrackSelection.get_current_track()
|
||||
_build_track(track)
|
||||
|
||||
|
||||
"""
|
||||
func _draw():
|
||||
draw_polyline(curve.get_baked_points(), Color.chartreuse, 4.0)
|
||||
for idx in range(0,curve.get_point_count()):
|
||||
draw_circle(curve.get_point_in(idx), 2.0, Color.green)
|
||||
draw_circle(curve.get_point_out(idx), 2.0, Color.blue)
|
||||
"""
|
||||
|
||||
|
||||
func _build_track(tiles):
|
||||
""" Build the track curve given a tile path """
|
||||
|
||||
Reference in New Issue
Block a user