From feb18d37762eb8f4414625175576f8fe9debd992 Mon Sep 17 00:00:00 2001 From: realtradam Date: Sun, 15 Mar 2020 15:16:39 -0400 Subject: refactoring complete close #4 --- Racing-Game/4WheelCar/Skid/FLLine.gd | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 Racing-Game/4WheelCar/Skid/FLLine.gd (limited to 'Racing-Game/4WheelCar/Skid/FLLine.gd') diff --git a/Racing-Game/4WheelCar/Skid/FLLine.gd b/Racing-Game/4WheelCar/Skid/FLLine.gd new file mode 100644 index 0000000..fffcf04 --- /dev/null +++ b/Racing-Game/4WheelCar/Skid/FLLine.gd @@ -0,0 +1,25 @@ +extends Line2D + +# Declare member variables here. Examples: +# var a = 2 +# var b = "text" +var tempnode = 0 +var on = true + +# Called when the node enters the scene tree for the first time. +func _ready(): + tempnode = get_node("../Cars/4WheelCar/CarBody/Wheels/FLWheel") + pass # Replace with function body. + +# Called every frame. 'delta' is the elapsed time since the previous frame. +func _process(delta): + pass + +func _on_FLWheel_slip(): + if(on): + add_point(tempnode.get_global_position()) + + +func _on_FLWheel_end(): + duplicate(1) + on = false -- cgit v1.2.3