Files
CarRacer/wrong_way.gd

13 lines
292 B
GDScript

extends TextureRect
# Called when the node enters the scene tree for the first time.
func _ready():
set_visible(false)
func _on_RaceTrack_wrong_way(coords):
if coords == Vector2(-1,-1):
set_visible(false)
else:
set_visible(true)
set_position(Vector2(coords.x + 32, coords.y + 32))