musics etc
This commit is contained in:
parent
2e310f4053
commit
bb6404e918
36 changed files with 652 additions and 130 deletions
|
@ -1,6 +1,11 @@
|
|||
extends Node
|
||||
|
||||
@export var nb_checkpoints := 5
|
||||
|
||||
const LEVELS = [preload("res://scenes/levels/level1.tscn")]
|
||||
|
||||
var current_level = 0
|
||||
|
||||
@export var nb_checkpoints := 3
|
||||
@export var max_lap := 3
|
||||
|
||||
var current_checkpoint := 0
|
||||
|
@ -8,16 +13,14 @@ var current_lap := 0
|
|||
|
||||
func checkPointEnter(check_point_id):
|
||||
if check_point_id != current_checkpoint:
|
||||
print("not good checkpoint")
|
||||
return
|
||||
|
||||
if check_point_id == 0:
|
||||
current_lap += 1
|
||||
current_checkpoint = 1
|
||||
print("new lap")
|
||||
else:
|
||||
current_checkpoint += 1
|
||||
print(current_checkpoint)
|
||||
else:
|
||||
current_checkpoint += 1
|
||||
current_checkpoint %= nb_checkpoints
|
||||
|
||||
if (current_lap == max_lap):
|
||||
endTrack()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue