diff options
| author | realtradam <[email protected]> | 2020-03-15 15:16:39 -0400 |
|---|---|---|
| committer | realtradam <[email protected]> | 2020-03-15 15:16:39 -0400 |
| commit | feb18d37762eb8f4414625175576f8fe9debd992 (patch) | |
| tree | cd7d7409f0cc67f846b33f4fb9d9a329ec207883 /Racing-Game/4WheelCar/Skid/Skidmarks.gd | |
| parent | c65f6805081e999fa231f71b231dba6dc05286ea (diff) | |
| download | optimal-direction-feb18d37762eb8f4414625175576f8fe9debd992.tar.gz optimal-direction-feb18d37762eb8f4414625175576f8fe9debd992.zip | |
refactoring complete close #4
Diffstat (limited to 'Racing-Game/4WheelCar/Skid/Skidmarks.gd')
| -rw-r--r-- | Racing-Game/4WheelCar/Skid/Skidmarks.gd | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Racing-Game/4WheelCar/Skid/Skidmarks.gd b/Racing-Game/4WheelCar/Skid/Skidmarks.gd new file mode 100644 index 0000000..4c662b4 --- /dev/null +++ b/Racing-Game/4WheelCar/Skid/Skidmarks.gd @@ -0,0 +1,21 @@ +extends Line2D + +# Declare member variables here. Examples: +# var a = 2 +# var b = "text" +var skidDraw = true +var wheel +var carBody + +# Called when the node enters the scene tree for the first time. +func _ready(): + wheel = get_parent().get_parent() + carBody = get_parent().get_parent().get_parent().get_parent() + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +func _process(delta): + global_position = Vector2(0,0) + global_rotation = 0 + if(skidDraw): + add_point(wheel.get_global_position()) |
