Initial commit
Un bout de jeu, qui fait pas grand chose mais on progresse.
This commit is contained in:
13
scenes/pathFollow.gd
Normal file
13
scenes/pathFollow.gd
Normal file
@@ -0,0 +1,13 @@
|
||||
extends PathFollow2D
|
||||
|
||||
@export var speed = 0.1
|
||||
var voiture
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
voiture = (self.get_child(0) as Voiture)
|
||||
voiture.updatePosition(position.x, position.y)
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta: float) -> void:
|
||||
progress_ratio += delta * speed;
|
||||
voiture.updatePosition(position.x, position.y)
|
||||
Reference in New Issue
Block a user