first commit
This commit is contained in:
16
OpponentCar.gd
Normal file
16
OpponentCar.gd
Normal file
@@ -0,0 +1,16 @@
|
||||
extends Node2D
|
||||
|
||||
onready var track = get_node("/root/Track2/Track/TrackOpponent/")
|
||||
export (float) var speed = 0.125
|
||||
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
$CarSprite.set_animation("police")
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
var position = track.get_unit_offset()
|
||||
position += speed * delta
|
||||
track.set_unit_offset(position)
|
||||
|
||||
Reference in New Issue
Block a user