From 007e9dab410d825e92b0d391fd8356efcb4cb5db Mon Sep 17 00:00:00 2001 From: realtradam Date: Sun, 15 Mar 2020 03:24:21 -0400 Subject: updated file structure, still not done --- Racing-Game/4WheelCar/BLLine.gd | 25 ++++++++++++++++ Racing-Game/4WheelCar/BRLine.gd | 30 +++++++++++++++++++ Racing-Game/4WheelCar/CPUParticles2D.gd | 13 +++++++++ Racing-Game/4WheelCar/Engine.gd | 13 +++++++++ Racing-Game/4WheelCar/FLLine.gd | 25 ++++++++++++++++ Racing-Game/4WheelCar/FRLine.gd | 25 ++++++++++++++++ Racing-Game/4WheelCar/FrontWheel.gd | 2 +- Racing-Game/4WheelCar/FrontWheelSprite.gd | 17 +++++++++++ Racing-Game/4WheelCar/SkidController.gd | 4 +-- Racing-Game/4WheelCar/Skidmark.tscn | 11 +++++++ Racing-Game/BLLine.gd | 25 ---------------- Racing-Game/CPUParticles2D.gd | 13 --------- Racing-Game/Camera2D.tscn | 48 ------------------------------- Racing-Game/Engine.gd | 13 --------- Racing-Game/FLLine.gd | 25 ---------------- Racing-Game/FRLine.gd | 25 ---------------- Racing-Game/FrontWheelSprite.gd | 17 ----------- Racing-Game/Interface/Camera2D.tscn | 48 +++++++++++++++++++++++++++++++ Racing-Game/KinematicBody2D.gd | 2 +- Racing-Game/MyLine.gd | 30 ------------------- Racing-Game/Skidmark.tscn | 11 ------- Racing-Game/World.tscn | 8 +++--- 22 files changed, 215 insertions(+), 215 deletions(-) create mode 100644 Racing-Game/4WheelCar/BLLine.gd create mode 100644 Racing-Game/4WheelCar/BRLine.gd create mode 100644 Racing-Game/4WheelCar/CPUParticles2D.gd create mode 100644 Racing-Game/4WheelCar/Engine.gd create mode 100644 Racing-Game/4WheelCar/FLLine.gd create mode 100644 Racing-Game/4WheelCar/FRLine.gd create mode 100644 Racing-Game/4WheelCar/FrontWheelSprite.gd create mode 100644 Racing-Game/4WheelCar/Skidmark.tscn delete mode 100644 Racing-Game/BLLine.gd delete mode 100644 Racing-Game/CPUParticles2D.gd delete mode 100644 Racing-Game/Camera2D.tscn delete mode 100644 Racing-Game/Engine.gd delete mode 100644 Racing-Game/FLLine.gd delete mode 100644 Racing-Game/FRLine.gd delete mode 100644 Racing-Game/FrontWheelSprite.gd create mode 100644 Racing-Game/Interface/Camera2D.tscn delete mode 100644 Racing-Game/MyLine.gd delete mode 100644 Racing-Game/Skidmark.tscn diff --git a/Racing-Game/4WheelCar/BLLine.gd b/Racing-Game/4WheelCar/BLLine.gd new file mode 100644 index 0000000..042b034 --- /dev/null +++ b/Racing-Game/4WheelCar/BLLine.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/BLWheel") + pass # Replace with function body. + +# Called every frame. 'delta' is the elapsed time since the previous frame. +func _process(delta): + pass + +func _on_BLWheel_slip(): + if(on): + add_point(tempnode.get_global_position()) + + +func _on_BLWheel_end(): + duplicate(1) + on = false diff --git a/Racing-Game/4WheelCar/BRLine.gd b/Racing-Game/4WheelCar/BRLine.gd new file mode 100644 index 0000000..16578e3 --- /dev/null +++ b/Racing-Game/4WheelCar/BRLine.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() diff --git a/Racing-Game/4WheelCar/CPUParticles2D.gd b/Racing-Game/4WheelCar/CPUParticles2D.gd new file mode 100644 index 0000000..d5eaef4 --- /dev/null +++ b/Racing-Game/4WheelCar/CPUParticles2D.gd @@ -0,0 +1,13 @@ +extends CPUParticles2D + +# Declare member variables here. Examples: +# var a = 2 +# var b = "text" + +# Called when the node enters the scene tree for the first time. +func _ready(): + pass # Replace with function body. + +# Called every frame. 'delta' is the elapsed time since the previous frame. +#func _process(delta): +# pass diff --git a/Racing-Game/4WheelCar/Engine.gd b/Racing-Game/4WheelCar/Engine.gd new file mode 100644 index 0000000..46c8298 --- /dev/null +++ b/Racing-Game/4WheelCar/Engine.gd @@ -0,0 +1,13 @@ +extends RigidBody2D + +# Declare member variables here. Examples: +# var a = 2 +# var b = "text" + +# Called when the node enters the scene tree for the first time. +func _ready(): + pass # Replace with function body. + +# Called every frame. 'delta' is the elapsed time since the previous frame. +func _process(delta): + set_rotation(get_node("../../CarBody").get_rotation()) diff --git a/Racing-Game/4WheelCar/FLLine.gd b/Racing-Game/4WheelCar/FLLine.gd new file mode 100644 index 0000000..fffcf04 --- /dev/null +++ b/Racing-Game/4WheelCar/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 diff --git a/Racing-Game/4WheelCar/FRLine.gd b/Racing-Game/4WheelCar/FRLine.gd new file mode 100644 index 0000000..e1fbc0f --- /dev/null +++ b/Racing-Game/4WheelCar/FRLine.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/FRWheel") + pass # Replace with function body. + +# Called every frame. 'delta' is the elapsed time since the previous frame. +func _process(delta): + pass + +func _on_FRWheel_slip(): + if(on): + add_point(tempnode.get_global_position()) + + +func _on_FRWheel_end(): + duplicate(1) + on = false diff --git a/Racing-Game/4WheelCar/FrontWheel.gd b/Racing-Game/4WheelCar/FrontWheel.gd index 2333113..280a8a3 100644 --- a/Racing-Game/4WheelCar/FrontWheel.gd +++ b/Racing-Game/4WheelCar/FrontWheel.gd @@ -10,7 +10,7 @@ var velAngle var carAngle var delay = 0 -onready var skidObj = preload("res://Skidmark.tscn") +onready var skidObj = preload("res://4WheelCar/Skidmark.tscn") var steerDamp = 1 diff --git a/Racing-Game/4WheelCar/FrontWheelSprite.gd b/Racing-Game/4WheelCar/FrontWheelSprite.gd new file mode 100644 index 0000000..e0426d4 --- /dev/null +++ b/Racing-Game/4WheelCar/FrontWheelSprite.gd @@ -0,0 +1,17 @@ +extends Sprite + +# Declare member variables here. Examples: +# var a = 2 +# var b = "text" + +# Called when the node enters the scene tree for the first time. +func _ready(): + pass # Replace with function body. + +# Called every frame. 'delta' is the elapsed time since the previous frame. +func _process(delta): +# if Input.is_key_pressed(KEY_A): +# set_rotation(get_node("../../../../CarBody").get_rotation()-PI/4) +# if Input.is_key_pressed(KEY_D): +# set_rotation(get_node("../../../../CarBody").get_rotation()+PI/4) + pass diff --git a/Racing-Game/4WheelCar/SkidController.gd b/Racing-Game/4WheelCar/SkidController.gd index 105eb3b..745b195 100644 --- a/Racing-Game/4WheelCar/SkidController.gd +++ b/Racing-Game/4WheelCar/SkidController.gd @@ -11,7 +11,7 @@ var deleteme = 0; # Called when the node enters the scene tree for the first time. func _ready(): - skidFile = load("res://Skidmark.tscn") + skidFile = load("res://4WheelCar/Skidmark.tscn") skidRecent = skidFile.instance() add_child(skidRecent) @@ -25,7 +25,7 @@ func _process(delta): # create new skidding child, and set skid to true skidSwitch = true - skidFile = load("res://Skidmark.tscn") + skidFile = load("res://4WheelCar/Skidmark.tscn") skidRecent = skidFile.instance() add_child(skidRecent) #set to run diff --git a/Racing-Game/4WheelCar/Skidmark.tscn b/Racing-Game/4WheelCar/Skidmark.tscn new file mode 100644 index 0000000..46c5d40 --- /dev/null +++ b/Racing-Game/4WheelCar/Skidmark.tscn @@ -0,0 +1,11 @@ +[gd_scene load_steps=3 format=2] + +[ext_resource path="res://Art(non-orig)/PNG/Objects/skidmark_short_1.png" type="Texture" id=1] +[ext_resource path="res://4WheelCar/Skidmarks.gd" type="Script" id=2] + +[node name="Skidmark" type="Line2D"] +position = Vector2( -21.2326, -38.4176 ) +default_color = Color( 0.4, 0.501961, 1, 1 ) +texture = ExtResource( 1 ) +texture_mode = 192263440 +script = ExtResource( 2 ) diff --git a/Racing-Game/BLLine.gd b/Racing-Game/BLLine.gd deleted file mode 100644 index 755241d..0000000 --- a/Racing-Game/BLLine.gd +++ /dev/null @@ -1,25 +0,0 @@ -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/BLWheel") - pass # Replace with function body. - -# Called every frame. 'delta' is the elapsed time since the previous frame. -func _process(delta): - pass - -func _on_BLWheel_slip(): - if(on): - add_point(tempnode.get_global_position()) - - -func _on_BLWheel_end(): - duplicate(1) - on = false \ No newline at end of file diff --git a/Racing-Game/CPUParticles2D.gd b/Racing-Game/CPUParticles2D.gd deleted file mode 100644 index d5eaef4..0000000 --- a/Racing-Game/CPUParticles2D.gd +++ /dev/null @@ -1,13 +0,0 @@ -extends CPUParticles2D - -# Declare member variables here. Examples: -# var a = 2 -# var b = "text" - -# Called when the node enters the scene tree for the first time. -func _ready(): - pass # Replace with function body. - -# Called every frame. 'delta' is the elapsed time since the previous frame. -#func _process(delta): -# pass diff --git a/Racing-Game/Camera2D.tscn b/Racing-Game/Camera2D.tscn deleted file mode 100644 index 31a2ec2..0000000 --- a/Racing-Game/Camera2D.tscn +++ /dev/null @@ -1,48 +0,0 @@ -[gd_scene load_steps=5 format=2] - -[ext_resource path="res://Interface/Camera2D.gd" type="Script" id=1] -[ext_resource path="res://Art(non-orig)/LCDMonoWinTT/LCDML___.TTF" type="DynamicFontData" id=2] -[ext_resource path="res://Interface/RichTextLabel.gd" type="Script" id=3] - - - -[sub_resource type="DynamicFont" id=9] -size = 200 -font_data = ExtResource( 2 ) - -[node name="Camera2D" type="Camera2D"] -position = Vector2( -895.896, -973.722 ) -rotating = true -current = true -zoom = Vector2( 2, 2 ) -drag_margin_h_enabled = false -drag_margin_v_enabled = false -drag_margin_left = 0.05 -drag_margin_top = 0.05 -drag_margin_right = 0.05 -drag_margin_bottom = 0.05 -script = ExtResource( 1 ) -__meta__ = { -"_edit_group_": true -} - -[node name="Panel" type="Panel" parent="."] -margin_left = 479.896 -margin_top = 237.722 -margin_right = 895.896 -margin_bottom = 492.722 - -[node name="RichTextLabel" type="RichTextLabel" parent="Panel"] -anchor_right = 0.004 -margin_left = 44.7994 -margin_top = 34.9523 -margin_right = 386.135 -margin_bottom = 212.952 -custom_fonts/normal_font = SubResource( 9 ) -custom_colors/default_color = Color( 0.0784314, 1, 0, 1 ) -text = "123" -scroll_active = false -script = ExtResource( 3 ) -__meta__ = { -"_edit_group_": true -} diff --git a/Racing-Game/Engine.gd b/Racing-Game/Engine.gd deleted file mode 100644 index 46c8298..0000000 --- a/Racing-Game/Engine.gd +++ /dev/null @@ -1,13 +0,0 @@ -extends RigidBody2D - -# Declare member variables here. Examples: -# var a = 2 -# var b = "text" - -# Called when the node enters the scene tree for the first time. -func _ready(): - pass # Replace with function body. - -# Called every frame. 'delta' is the elapsed time since the previous frame. -func _process(delta): - set_rotation(get_node("../../CarBody").get_rotation()) diff --git a/Racing-Game/FLLine.gd b/Racing-Game/FLLine.gd deleted file mode 100644 index fffcf04..0000000 --- a/Racing-Game/FLLine.gd +++ /dev/null @@ -1,25 +0,0 @@ -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 diff --git a/Racing-Game/FRLine.gd b/Racing-Game/FRLine.gd deleted file mode 100644 index 3d3614c..0000000 --- a/Racing-Game/FRLine.gd +++ /dev/null @@ -1,25 +0,0 @@ -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/FRWheel") - pass # Replace with function body. - -# Called every frame. 'delta' is the elapsed time since the previous frame. -func _process(delta): - pass - -func _on_FRWheel_slip(): - if(on): - add_point(tempnode.get_global_position()) - - -func _on_FRWheel_end(): - duplicate(1) - on = false \ No newline at end of file diff --git a/Racing-Game/FrontWheelSprite.gd b/Racing-Game/FrontWheelSprite.gd deleted file mode 100644 index e0426d4..0000000 --- a/Racing-Game/FrontWheelSprite.gd +++ /dev/null @@ -1,17 +0,0 @@ -extends Sprite - -# Declare member variables here. Examples: -# var a = 2 -# var b = "text" - -# Called when the node enters the scene tree for the first time. -func _ready(): - pass # Replace with function body. - -# Called every frame. 'delta' is the elapsed time since the previous frame. -func _process(delta): -# if Input.is_key_pressed(KEY_A): -# set_rotation(get_node("../../../../CarBody").get_rotation()-PI/4) -# if Input.is_key_pressed(KEY_D): -# set_rotation(get_node("../../../../CarBody").get_rotation()+PI/4) - pass diff --git a/Racing-Game/Interface/Camera2D.tscn b/Racing-Game/Interface/Camera2D.tscn new file mode 100644 index 0000000..31a2ec2 --- /dev/null +++ b/Racing-Game/Interface/Camera2D.tscn @@ -0,0 +1,48 @@ +[gd_scene load_steps=5 format=2] + +[ext_resource path="res://Interface/Camera2D.gd" type="Script" id=1] +[ext_resource path="res://Art(non-orig)/LCDMonoWinTT/LCDML___.TTF" type="DynamicFontData" id=2] +[ext_resource path="res://Interface/RichTextLabel.gd" type="Script" id=3] + + + +[sub_resource type="DynamicFont" id=9] +size = 200 +font_data = ExtResource( 2 ) + +[node name="Camera2D" type="Camera2D"] +position = Vector2( -895.896, -973.722 ) +rotating = true +current = true +zoom = Vector2( 2, 2 ) +drag_margin_h_enabled = false +drag_margin_v_enabled = false +drag_margin_left = 0.05 +drag_margin_top = 0.05 +drag_margin_right = 0.05 +drag_margin_bottom = 0.05 +script = ExtResource( 1 ) +__meta__ = { +"_edit_group_": true +} + +[node name="Panel" type="Panel" parent="."] +margin_left = 479.896 +margin_top = 237.722 +margin_right = 895.896 +margin_bottom = 492.722 + +[node name="RichTextLabel" type="RichTextLabel" parent="Panel"] +anchor_right = 0.004 +margin_left = 44.7994 +margin_top = 34.9523 +margin_right = 386.135 +margin_bottom = 212.952 +custom_fonts/normal_font = SubResource( 9 ) +custom_colors/default_color = Color( 0.0784314, 1, 0, 1 ) +text = "123" +scroll_active = false +script = ExtResource( 3 ) +__meta__ = { +"_edit_group_": true +} diff --git a/Racing-Game/KinematicBody2D.gd b/Racing-Game/KinematicBody2D.gd index e024ffc..34844a4 100644 --- a/Racing-Game/KinematicBody2D.gd +++ b/Racing-Game/KinematicBody2D.gd @@ -18,4 +18,4 @@ func _physics_process(delta): motion.y += 10 motion = move_and_slide(motion, UP) - pass \ No newline at end of file + pass diff --git a/Racing-Game/MyLine.gd b/Racing-Game/MyLine.gd deleted file mode 100644 index 16578e3..0000000 --- a/Racing-Game/MyLine.gd +++ /dev/null @@ -1,30 +0,0 @@ -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() diff --git a/Racing-Game/Skidmark.tscn b/Racing-Game/Skidmark.tscn deleted file mode 100644 index 46c5d40..0000000 --- a/Racing-Game/Skidmark.tscn +++ /dev/null @@ -1,11 +0,0 @@ -[gd_scene load_steps=3 format=2] - -[ext_resource path="res://Art(non-orig)/PNG/Objects/skidmark_short_1.png" type="Texture" id=1] -[ext_resource path="res://4WheelCar/Skidmarks.gd" type="Script" id=2] - -[node name="Skidmark" type="Line2D"] -position = Vector2( -21.2326, -38.4176 ) -default_color = Color( 0.4, 0.501961, 1, 1 ) -texture = ExtResource( 1 ) -texture_mode = 192263440 -script = ExtResource( 2 ) diff --git a/Racing-Game/World.tscn b/Racing-Game/World.tscn index c5a1496..af59a77 100644 --- a/Racing-Game/World.tscn +++ b/Racing-Game/World.tscn @@ -19,11 +19,11 @@ [ext_resource path="res://Art(non-orig)/LCDMonoWinTT/LCDML___.TTF" type="DynamicFontData" id=17] [ext_resource path="res://Interface/RichTextLabel.gd" type="Script" id=18] [ext_resource path="res://Art(non-orig)/PNG/Objects/skidmark_short_2.png" type="Texture" id=19] -[ext_resource path="res://MyLine.gd" type="Script" id=20] -[ext_resource path="res://BLLine.gd" type="Script" id=21] +[ext_resource path="res://4WheelCar/BRLine.gd" type="Script" id=20] +[ext_resource path="res://4WheelCar/BLLine.gd" type="Script" id=21] [ext_resource path="res://Art(non-orig)/PNG/Objects/skidmark_short_1.png" type="Texture" id=22] -[ext_resource path="res://FRLine.gd" type="Script" id=23] -[ext_resource path="res://FLLine.gd" type="Script" id=24] +[ext_resource path="res://4WheelCar/FRLine.gd" type="Script" id=23] +[ext_resource path="res://4WheelCar/FLLine.gd" type="Script" id=24] [ext_resource path="res://Area2D.gd" type="Script" id=25] [sub_resource type="RectangleShape2D" id=1] -- cgit v1.2.3