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/SkidController.gd | |
| parent | c65f6805081e999fa231f71b231dba6dc05286ea (diff) | |
| download | optimal-direction-feb18d37762eb8f4414625175576f8fe9debd992.tar.gz optimal-direction-feb18d37762eb8f4414625175576f8fe9debd992.zip | |
refactoring complete close #4
Diffstat (limited to 'Racing-Game/4WheelCar/SkidController.gd')
| -rw-r--r-- | Racing-Game/4WheelCar/SkidController.gd | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/Racing-Game/4WheelCar/SkidController.gd b/Racing-Game/4WheelCar/SkidController.gd deleted file mode 100644 index 745b195..0000000 --- a/Racing-Game/4WheelCar/SkidController.gd +++ /dev/null @@ -1,38 +0,0 @@ -extends Node - -# Declare member variables here. Examples: -# var a = 2 -# var b = "text" -var skidSwitch = false # Is the wheel currantly skidding? -var skidFile # Stores the skid file -var skidRecent # Holds the most recent skidmark - -var deleteme = 0; - -# Called when the node enters the scene tree for the first time. -func _ready(): - skidFile = load("res://4WheelCar/Skidmark.tscn") - skidRecent = skidFile.instance() - add_child(skidRecent) - -# Called every frame. 'delta' is the elapsed time since the previous frame. -func _process(delta): - - if(skidSwitch && get_parent().isSkid):#if controller believes car is skidding and the wheel is skidding - #ignore the status and let the skid keep drawing - pass - elif(!skidSwitch && get_parent().isSkid):#controller doesnt skid, but wheel is supposed to be skidding - # create new skidding child, and set skid to true - - skidSwitch = true - skidFile = load("res://4WheelCar/Skidmark.tscn") - skidRecent = skidFile.instance() - add_child(skidRecent) - #set to run - pass - elif(!get_parent().isSkid): - #stop child from skidding and store - skidRecent.skidDraw = false - skidSwitch = false - pass - |
