From 1b29065bf87d498281705809c2d12d22449be0b5 Mon Sep 17 00:00:00 2001 From: Artus Date: Wed, 4 Nov 2020 22:59:53 +0100 Subject: [PATCH] fix naming convention --- Menu.tscn | 189 +++++++++++++--------- RaceTrack.tscn | 12 +- Oswald-Bold.otf => assets/Oswald-Bold.otf | Bin CarSprite.gd => car_sprite.gd | 0 font.tres | 2 +- OpponentCar.gd => opponent_car.gd | 0 PlayerCar.gd => player_car.gd | 0 RaceTrack.gd => race_track.gd | 0 TrackOpponent.gd => track_opponent.gd | 0 TrackPath.gd => track_path.gd | 0 Wrong Way.gd => wrong_way.gd | 0 wrong_way.tscn | 6 +- 12 files changed, 122 insertions(+), 87 deletions(-) rename Oswald-Bold.otf => assets/Oswald-Bold.otf (100%) rename CarSprite.gd => car_sprite.gd (100%) rename OpponentCar.gd => opponent_car.gd (100%) rename PlayerCar.gd => player_car.gd (100%) rename RaceTrack.gd => race_track.gd (100%) rename TrackOpponent.gd => track_opponent.gd (100%) rename TrackPath.gd => track_path.gd (100%) rename Wrong Way.gd => wrong_way.gd (100%) diff --git a/Menu.tscn b/Menu.tscn index 69375ff..c2cbd15 100644 --- a/Menu.tscn +++ b/Menu.tscn @@ -1,14 +1,7 @@ -[gd_scene load_steps=5 format=2] +[gd_scene load_steps=3 format=2] [ext_resource path="res://Menu.gd" type="Script" id=1] -[ext_resource path="res://Oswald-Bold.otf" type="DynamicFontData" id=2] -[ext_resource path="res://font.tres" type="DynamicFont" id=3] - -[sub_resource type="DynamicFont" id=1] -resource_name = "BaseFont" -size = 60 -use_filter = true -font_data = ExtResource( 2 ) +[ext_resource path="res://font.tres" type="DynamicFont" id=2] [node name="Menu" type="Control"] margin_right = 1920.0 @@ -19,18 +12,19 @@ script = ExtResource( 1 ) [node name="Title" type="Label" parent="."] anchor_left = 0.5 anchor_right = 0.5 -margin_left = -222.36 -margin_top = 201.721 -margin_right = 20.6399 -margin_bottom = 284.721 +margin_left = -960.0 +margin_top = 202.0 +margin_bottom = 285.0 rect_scale = Vector2( 2, 2 ) -custom_fonts/font = SubResource( 1 ) +custom_fonts/font = ExtResource( 2 ) custom_colors/font_color = Color( 0.921569, 0.564706, 0.0627451, 1 ) custom_colors/font_color_shadow = Color( 0.423529, 0.2, 0.0352941, 1 ) custom_constants/shadow_offset_x = 2 custom_constants/shadow_offset_y = 3 custom_constants/shadow_as_outline = 0 text = "Car Racer" +align = 1 +valign = 1 [node name="Options" type="VBoxContainer" parent="."] visible = false @@ -38,143 +32,178 @@ anchor_left = 0.5 anchor_top = 0.5 anchor_right = 0.5 anchor_bottom = 0.5 -margin_left = -250.169 -margin_top = -89.9366 -margin_right = 318.831 +margin_left = -960.0 +margin_top = -89.937 margin_bottom = 421.063 +rect_scale = Vector2( 2, 2 ) [node name="TrackSelection" type="HBoxContainer" parent="Options"] -editor/display_folded = true -margin_right = 569.0 +margin_right = 960.0 margin_bottom = 66.0 custom_constants/separation = 20 +alignment = 1 [node name="Label" type="Label" parent="Options/TrackSelection"] -margin_right = 326.0 -margin_bottom = 66.0 -custom_fonts/font = ExtResource( 3 ) -text = "Piste de course :" - -[node name="LeftArrow" type="Label" parent="Options/TrackSelection"] -margin_left = 346.0 -margin_right = 365.0 +margin_left = 213.0 +margin_right = 539.0 margin_bottom = 66.0 mouse_filter = 0 -custom_fonts/font = ExtResource( 3 ) +custom_fonts/font = ExtResource( 2 ) +text = "Piste de course :" +align = 1 +valign = 1 + +[node name="LeftArrow" type="Label" parent="Options/TrackSelection"] +margin_left = 559.0 +margin_right = 578.0 +margin_bottom = 66.0 +mouse_filter = 0 +custom_fonts/font = ExtResource( 2 ) +custom_colors/font_color_shadow = Color( 0.835294, 0.552941, 0.145098, 1 ) +custom_constants/shadow_offset_x = 2 +custom_constants/shadow_offset_y = 3 text = "<" [node name="Value" type="Label" parent="Options/TrackSelection"] -margin_left = 385.0 -margin_right = 495.0 +margin_left = 598.0 +margin_right = 708.0 margin_bottom = 66.0 -custom_fonts/font = ExtResource( 3 ) +custom_fonts/font = ExtResource( 2 ) text = "Démo" [node name="RightArrow" type="Label" parent="Options/TrackSelection"] -margin_left = 515.0 -margin_right = 534.0 +margin_left = 728.0 +margin_right = 747.0 margin_bottom = 66.0 mouse_filter = 0 -custom_fonts/font = ExtResource( 3 ) +custom_fonts/font = ExtResource( 2 ) +custom_colors/font_color_shadow = Color( 0.835294, 0.552941, 0.145098, 1 ) +custom_constants/shadow_offset_x = 2 +custom_constants/shadow_offset_y = 3 text = ">" [node name="GameMode" type="HBoxContainer" parent="Options"] -editor/display_folded = true margin_top = 70.0 -margin_right = 569.0 +margin_right = 960.0 margin_bottom = 136.0 custom_constants/separation = 20 +alignment = 1 [node name="Label" type="Label" parent="Options/GameMode"] -margin_right = 208.0 -margin_bottom = 66.0 -custom_fonts/font = ExtResource( 3 ) -text = "Difficulté :" - -[node name="LeftArrow" type="Label" parent="Options/GameMode"] -margin_left = 228.0 -margin_right = 247.0 +margin_left = 195.0 +margin_right = 403.0 margin_bottom = 66.0 mouse_filter = 0 -custom_fonts/font = ExtResource( 3 ) +custom_fonts/font = ExtResource( 2 ) +text = "Difficulté :" +align = 1 +valign = 1 + +[node name="LeftArrow" type="Label" parent="Options/GameMode"] +margin_left = 423.0 +margin_right = 442.0 +margin_bottom = 66.0 +mouse_filter = 0 +custom_fonts/font = ExtResource( 2 ) +custom_colors/font_color_shadow = Color( 0.835294, 0.552941, 0.145098, 1 ) +custom_constants/shadow_offset_x = 2 +custom_constants/shadow_offset_y = 3 text = "<" [node name="Value" type="Label" parent="Options/GameMode"] -margin_left = 267.0 -margin_right = 530.0 +margin_left = 462.0 +margin_right = 725.0 margin_bottom = 66.0 -custom_fonts/font = ExtResource( 3 ) +custom_fonts/font = ExtResource( 2 ) text = "Entraînement" [node name="RightArrow" type="Label" parent="Options/GameMode"] -margin_left = 550.0 -margin_right = 569.0 +margin_left = 745.0 +margin_right = 764.0 margin_bottom = 66.0 mouse_filter = 0 -custom_fonts/font = ExtResource( 3 ) +custom_fonts/font = ExtResource( 2 ) +custom_colors/font_color_shadow = Color( 0.835294, 0.552941, 0.145098, 1 ) +custom_constants/shadow_offset_x = 2 +custom_constants/shadow_offset_y = 3 text = ">" [node name="InputMode" type="HBoxContainer" parent="Options"] -editor/display_folded = true margin_top = 140.0 -margin_right = 569.0 +margin_right = 960.0 margin_bottom = 206.0 custom_constants/separation = 20 +alignment = 1 [node name="Label" type="Label" parent="Options/InputMode"] -margin_right = 235.0 -margin_bottom = 66.0 -custom_fonts/font = ExtResource( 3 ) -text = "Contrôleur :" - -[node name="LeftArrow" type="Label" parent="Options/InputMode"] -margin_left = 255.0 -margin_right = 274.0 +margin_left = 245.0 +margin_right = 493.0 margin_bottom = 66.0 mouse_filter = 0 -custom_fonts/font = ExtResource( 3 ) +custom_fonts/font = ExtResource( 2 ) +text = "Contrôlleur :" +align = 1 +valign = 1 + +[node name="LeftArrow" type="Label" parent="Options/InputMode"] +margin_left = 513.0 +margin_right = 532.0 +margin_bottom = 66.0 +mouse_filter = 0 +custom_fonts/font = ExtResource( 2 ) +custom_colors/font_color_shadow = Color( 0.835294, 0.552941, 0.145098, 1 ) +custom_constants/shadow_offset_x = 2 +custom_constants/shadow_offset_y = 3 text = "<" [node name="Value" type="Label" parent="Options/InputMode"] -margin_left = 294.0 -margin_right = 417.0 +margin_left = 552.0 +margin_right = 675.0 margin_bottom = 66.0 -custom_fonts/font = ExtResource( 3 ) +custom_fonts/font = ExtResource( 2 ) text = "Souris" [node name="RightArrow" type="Label" parent="Options/InputMode"] -margin_left = 437.0 -margin_right = 456.0 +margin_left = 695.0 +margin_right = 714.0 margin_bottom = 66.0 mouse_filter = 0 -custom_fonts/font = ExtResource( 3 ) +custom_fonts/font = ExtResource( 2 ) +custom_colors/font_color_shadow = Color( 0.835294, 0.552941, 0.145098, 1 ) +custom_constants/shadow_offset_x = 2 +custom_constants/shadow_offset_y = 3 text = ">" [node name="Return" type="Label" parent="Options"] margin_top = 210.0 -margin_right = 569.0 +margin_right = 960.0 margin_bottom = 276.0 mouse_filter = 0 -custom_fonts/font = ExtResource( 3 ) +custom_fonts/font = ExtResource( 2 ) +custom_colors/font_color = Color( 1, 1, 1, 1 ) +custom_colors/font_color_shadow = Color( 0.823529, 0.517647, 0.0823529, 1 ) +custom_constants/shadow_offset_x = 2 +custom_constants/shadow_offset_y = 3 text = "Retour" +align = 1 +valign = 1 [node name="Main" type="VBoxContainer" parent="."] anchor_left = 0.5 anchor_top = 0.5 anchor_right = 0.5 anchor_bottom = 0.5 -margin_left = -139.571 -margin_top = -76.9716 -margin_right = 9.42896 -margin_bottom = 129.028 +margin_left = -960.0 +margin_top = -76.972 +margin_bottom = 180.028 rect_scale = Vector2( 2, 2 ) mouse_default_cursor_shape = 9 [node name="Jouer" type="Label" parent="Main"] -margin_right = 149.0 +margin_right = 960.0 margin_bottom = 66.0 mouse_filter = 0 -custom_fonts/font = ExtResource( 3 ) +custom_fonts/font = ExtResource( 2 ) custom_colors/font_color = Color( 1, 1, 1, 1 ) custom_colors/font_color_shadow = Color( 0.823529, 0.517647, 0.0823529, 1 ) custom_constants/shadow_offset_x = 2 @@ -185,10 +214,10 @@ valign = 1 [node name="Options" type="Label" parent="Main"] margin_top = 70.0 -margin_right = 149.0 +margin_right = 960.0 margin_bottom = 136.0 mouse_filter = 0 -custom_fonts/font = ExtResource( 3 ) +custom_fonts/font = ExtResource( 2 ) custom_colors/font_color = Color( 1, 1, 1, 1 ) custom_colors/font_color_shadow = Color( 0.823529, 0.517647, 0.0823529, 1 ) custom_constants/shadow_offset_x = 2 @@ -198,10 +227,10 @@ align = 1 [node name="Quitter" type="Label" parent="Main"] margin_top = 140.0 -margin_right = 149.0 +margin_right = 960.0 margin_bottom = 206.0 mouse_filter = 0 -custom_fonts/font = ExtResource( 3 ) +custom_fonts/font = ExtResource( 2 ) custom_colors/font_color = Color( 1, 1, 1, 1 ) custom_colors/font_color_shadow = Color( 0.823529, 0.517647, 0.0823529, 1 ) custom_constants/shadow_offset_x = 2 diff --git a/RaceTrack.tscn b/RaceTrack.tscn index a46dfff..b3545b9 100644 --- a/RaceTrack.tscn +++ b/RaceTrack.tscn @@ -1,10 +1,10 @@ [gd_scene load_steps=39 format=2] -[ext_resource path="res://RaceTrack.gd" type="Script" id=1] +[ext_resource path="res://race_track.gd" type="Script" id=1] [ext_resource path="res://assets/track_tiles/track.png" type="Texture" id=2] [ext_resource path="res://TileMap.gd" type="Script" id=3] -[ext_resource path="res://TrackPath.gd" type="Script" id=4] -[ext_resource path="res://OpponentCar.gd" type="Script" id=5] +[ext_resource path="res://track_path.gd" type="Script" id=4] +[ext_resource path="res://opponent_car.gd" type="Script" id=5] [ext_resource path="res://assets/2D_Car_Pack_DevilsWorkShop_V01/bus/busiso_0007.png" type="Texture" id=6] [ext_resource path="res://assets/2D_Car_Pack_DevilsWorkShop_V01/bus/busiso_0004.png" type="Texture" id=7] [ext_resource path="res://assets/2D_Car_Pack_DevilsWorkShop_V01/bus/busiso_0001.png" type="Texture" id=8] @@ -29,10 +29,14 @@ [ext_resource path="res://assets/2D_Car_Pack_DevilsWorkShop_V01/policeCar/policeiso_0000.png" type="Texture" id=27] [ext_resource path="res://assets/2D_Car_Pack_DevilsWorkShop_V01/policeCar/policeiso_0005.png" type="Texture" id=28] [ext_resource path="res://assets/2D_Car_Pack_DevilsWorkShop_V01/policeCar/policeiso_0006.png" type="Texture" id=29] -[ext_resource path="res://CarSprite.gd" type="Script" id=30] +[ext_resource path="res://car_sprite.gd" type="Script" id=30] [ext_resource path="res://Player.gd" type="Script" id=31] [ext_resource path="res://wrong_way.tscn" type="PackedScene" id=32] + + + + [sub_resource type="Gradient" id=1] colors = PoolColorArray( 0.284025, 0.4375, 0.0803223, 1, 0.30305, 0.480469, 0.0675659, 1 ) diff --git a/Oswald-Bold.otf b/assets/Oswald-Bold.otf similarity index 100% rename from Oswald-Bold.otf rename to assets/Oswald-Bold.otf diff --git a/CarSprite.gd b/car_sprite.gd similarity index 100% rename from CarSprite.gd rename to car_sprite.gd diff --git a/font.tres b/font.tres index db0eb3d..54cf614 100644 --- a/font.tres +++ b/font.tres @@ -1,6 +1,6 @@ [gd_resource type="DynamicFont" load_steps=2 format=2] -[ext_resource path="res://Oswald-Bold.otf" type="DynamicFontData" id=1] +[ext_resource path="res://assets/Oswald-Bold.otf" type="DynamicFontData" id=1] [resource] resource_name = "BaseFont" diff --git a/OpponentCar.gd b/opponent_car.gd similarity index 100% rename from OpponentCar.gd rename to opponent_car.gd diff --git a/PlayerCar.gd b/player_car.gd similarity index 100% rename from PlayerCar.gd rename to player_car.gd diff --git a/RaceTrack.gd b/race_track.gd similarity index 100% rename from RaceTrack.gd rename to race_track.gd diff --git a/TrackOpponent.gd b/track_opponent.gd similarity index 100% rename from TrackOpponent.gd rename to track_opponent.gd diff --git a/TrackPath.gd b/track_path.gd similarity index 100% rename from TrackPath.gd rename to track_path.gd diff --git a/Wrong Way.gd b/wrong_way.gd similarity index 100% rename from Wrong Way.gd rename to wrong_way.gd diff --git a/wrong_way.tscn b/wrong_way.tscn index f18ffbd..fb9979b 100644 --- a/wrong_way.tscn +++ b/wrong_way.tscn @@ -1,7 +1,9 @@ [gd_scene load_steps=4 format=2] -[ext_resource path="res://Oswald-Bold.otf" type="DynamicFontData" id=1] -[ext_resource path="res://Wrong Way.gd" type="Script" id=2] +[ext_resource path="res://assets/Oswald-Bold.otf" type="DynamicFontData" id=1] +[ext_resource path="res://wrong_way.gd" type="Script" id=2] + + [sub_resource type="DynamicFont" id=5] size = 40