summaryrefslogtreecommitdiffhomepage
path: root/Racing-Game/MyLine.gd
diff options
context:
space:
mode:
Diffstat (limited to 'Racing-Game/MyLine.gd')
-rw-r--r--Racing-Game/MyLine.gd30
1 files changed, 30 insertions, 0 deletions
diff --git a/Racing-Game/MyLine.gd b/Racing-Game/MyLine.gd
new file mode 100644
index 0000000..16578e3
--- /dev/null
+++ b/Racing-Game/MyLine.gd
@@ -0,0 +1,30 @@
+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():
+ print("ready")
+ tempnode = get_node("../Cars/4WheelCar/CarBody/Wheels/BRWheel")
+ clear_points()
+ pass # Replace with function body.
+
+# Called every frame. 'delta' is the elapsed time since the previous frame.
+func _process(delta):
+ pass
+
+func _on_BRWheel_slip():
+ while on:
+ print("slip2")
+ add_point(tempnode.get_global_position())
+
+
+func _on_BRWheel_end():
+ on = false
+ print("duplicated")
+ var duplication = duplicate(13)
+ duplication.request_ready()