17 lines
301 B
GDScript3
17 lines
301 B
GDScript3
|
extends Node2D
|
||
|
@onready var car: CharacterBody2D = $Car
|
||
|
|
||
|
|
||
|
func getSpeed() -> float:
|
||
|
return car.velocity.length()
|
||
|
|
||
|
func getPosition():
|
||
|
return car.position
|
||
|
|
||
|
func setPosition(p:Vector2):
|
||
|
car.position=p
|
||
|
|
||
|
func setPlayerinformation(playerid, playercolor):
|
||
|
car.playerid=playerid
|
||
|
#TODO set playercolor
|