adds basic menu functionnality

This commit is contained in:
2020-11-03 23:04:17 +01:00
parent 4f2a4768c8
commit 3e10a98beb
13 changed files with 175 additions and 95 deletions

View File

@@ -7,17 +7,19 @@ 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():
func _reset():
var track = TrackSelection.get_current_track()
_build_track(track)
$Opponent.set_offset(0.0)
$Player.set_offset(0.0)
"""
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 """