diff options
| author | realtradam <[email protected]> | 2020-03-19 03:32:54 -0400 |
|---|---|---|
| committer | realtradam <[email protected]> | 2020-03-19 03:32:54 -0400 |
| commit | c7e8f17ba13d4c9e54764286367a26f25b049dc4 (patch) | |
| tree | 6ed85dcd09186f9884b77d56c81f94136154577a /Racing-Game/4WheelCar/Skid | |
| parent | 57c5f73d0d957dc426d922d591fa5a0dd1452892 (diff) | |
| download | optimal-direction-c7e8f17ba13d4c9e54764286367a26f25b049dc4.tar.gz optimal-direction-c7e8f17ba13d4c9e54764286367a26f25b049dc4.zip | |
fixed up file structure
Diffstat (limited to 'Racing-Game/4WheelCar/Skid')
| -rw-r--r-- | Racing-Game/4WheelCar/Skid/SkidController.gd | 36 | ||||
| -rw-r--r-- | Racing-Game/4WheelCar/Skid/Skidmark.tscn | 11 | ||||
| -rw-r--r-- | Racing-Game/4WheelCar/Skid/Skidmarks.gd | 15 |
3 files changed, 0 insertions, 62 deletions
diff --git a/Racing-Game/4WheelCar/Skid/SkidController.gd b/Racing-Game/4WheelCar/Skid/SkidController.gd deleted file mode 100644 index e3b28c3..0000000 --- a/Racing-Game/4WheelCar/Skid/SkidController.gd +++ /dev/null @@ -1,36 +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/Skid/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/Skid/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 - diff --git a/Racing-Game/4WheelCar/Skid/Skidmark.tscn b/Racing-Game/4WheelCar/Skid/Skidmark.tscn deleted file mode 100644 index 17ecee0..0000000 --- a/Racing-Game/4WheelCar/Skid/Skidmark.tscn +++ /dev/null @@ -1,11 +0,0 @@ -[gd_scene load_steps=3 format=2] - -[ext_resource path="res://4WheelCar/Skid/Skidmarks.gd" type="Script" id=1] -[ext_resource path="res://Art(non-orig)/PNG/Objects/skidmark_short_1.png" type="Texture" id=2] - -[node name="Skidmark" type="Line2D"] -position = Vector2( -21.2326, -38.4176 ) -default_color = Color( 0.4, 0.501961, 1, 1 ) -texture = ExtResource( 2 ) -texture_mode = 192263440 -script = ExtResource( 1 ) diff --git a/Racing-Game/4WheelCar/Skid/Skidmarks.gd b/Racing-Game/4WheelCar/Skid/Skidmarks.gd deleted file mode 100644 index 07bf622..0000000 --- a/Racing-Game/4WheelCar/Skid/Skidmarks.gd +++ /dev/null @@ -1,15 +0,0 @@ -extends Line2D - -var skidDraw = true -var wheel -var carBody - -func _ready(): - wheel = get_parent().get_parent() - carBody = get_parent().get_parent().get_parent().get_parent() - -func _process(_delta): - global_position = Vector2(0,0) - global_rotation = 0 - if(skidDraw): - add_point(wheel.get_global_position()) |
