Plus de feux rouges et des portes qui vont vivre
Et oui du nouveau encore!
This commit is contained in:
@@ -8,9 +8,13 @@ extends PathFollow2D
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta: float) -> void:
|
||||
if car == null:
|
||||
return
|
||||
if (delta > 0.01):
|
||||
return
|
||||
if position.distance_to(car.position) < distanceMax:
|
||||
progress += car.speed * delta
|
||||
if progress_ratio > 1:
|
||||
progress_ratio = progress_ratio - 1
|
||||
if progress_ratio > 0:
|
||||
if progress > 0:
|
||||
car.moveTo(position);
|
||||
|
||||
Reference in New Issue
Block a user