From 023f6ec90ecfbf10e3e91089fad82137080da53b Mon Sep 17 00:00:00 2001 From: Anthony Wilcox <35226681+antonwilc0x@users.noreply.github.com> Date: Sun, 5 May 2019 12:07:27 -0400 Subject: [PATCH] Change clothes with if statements Migrating over changing clothes from bindings over to if statements using is_pressed(). This should make it a lot more easier to maintaing because the bindings started to feel like overkill and cluttered up the code when they were only tasked to do one thing. - DJ shorts has been redone - Camera was renamed to CanonCam - Renamed ModernScn to GameScn - Removed RefRect --- project/scn/Clothes.tscn | 125 +++++++--------- project/scn/{ModernScn.tscn => GameScn.tscn} | 0 project/scn/TitleScn.tscn | 6 +- project/sprites/dj_shorts.svg | 149 +++++++++++++++++++ project/sprites/dj_shorts.svg.import | 34 +++++ project/sprites/dressup_wardrobe.svg | 16 +- project/src/Clothes.gd | 18 ++- project/src/GameKit.gd | 2 +- project/src/Soundtrack.gd | 9 +- 9 files changed, 269 insertions(+), 90 deletions(-) rename project/scn/{ModernScn.tscn => GameScn.tscn} (100%) create mode 100644 project/sprites/dj_shorts.svg create mode 100644 project/sprites/dj_shorts.svg.import diff --git a/project/scn/Clothes.tscn b/project/scn/Clothes.tscn index eafed02..ab7890a 100644 --- a/project/scn/Clothes.tscn +++ b/project/scn/Clothes.tscn @@ -4,7 +4,7 @@ [ext_resource path="res://sprites/dressup_wardrobe.svg" type="Texture" id=2] [ext_resource path="res://sprites/lights.png" type="Texture" id=3] [ext_resource path="res://sprites/jeans.svg" type="Texture" id=4] -[ext_resource path="res://sprites/dj_shorts.png" type="Texture" id=5] +[ext_resource path="res://sprites/dj_shorts.svg" type="Texture" id=5] [ext_resource path="res://sprites/sweat_pants.svg" type="Texture" id=6] [ext_resource path="res://sprites/blue_camo_jeans.svg" type="Texture" id=7] [ext_resource path="res://sprites/beat_up_jeans.svg" type="Texture" id=8] @@ -50,68 +50,60 @@ texture = ExtResource( 2 ) position = Vector2( 646.371, 187.333 ) texture = ExtResource( 3 ) -[node name="RefRect" type="ReferenceRect" parent="."] -anchor_right = 1.0 -anchor_bottom = 1.0 +[node name="Wordrobe" type="TabContainer" parent="."] margin_left = 323.421 -margin_top = 45.0 -margin_right = -38.579 -margin_bottom = -30.0 - -[node name="Wordrobe" type="TabContainer" parent="RefRect"] -margin_top = 18.0 -margin_right = 633.0 -margin_bottom = 510.0 +margin_top = 63.0 +margin_right = 956.421 +margin_bottom = 555.0 custom_styles/tab_fg = SubResource( 1 ) custom_styles/tab_bg = SubResource( 2 ) custom_styles/panel = SubResource( 3 ) custom_colors/font_color_bg = Color( 1, 1, 1, 1 ) custom_colors/font_color_fg = Color( 0.980392, 0.992157, 0.768627, 1 ) -[node name="Pants" type="Tabs" parent="RefRect/Wordrobe"] -visible = false +[node name="Pants" type="Tabs" parent="Wordrobe"] anchor_right = 1.0 anchor_bottom = 1.0 margin_top = 29.0 custom_constants/hseparation = 0 -[node name="PantsGrid" type="GridContainer" parent="RefRect/Wordrobe/Pants"] +[node name="PantsGrid" type="GridContainer" parent="Wordrobe/Pants"] margin_left = 42.0 margin_top = 13.0 margin_right = 600.0 margin_bottom = 425.0 columns = 5 -[node name="Jeans" type="TextureButton" parent="RefRect/Wordrobe/Pants/PantsGrid"] +[node name="Jeans" type="TextureButton" parent="Wordrobe/Pants/PantsGrid"] margin_right = 118.0 margin_bottom = 112.0 texture_normal = ExtResource( 4 ) -[node name="DJ Shorts" type="TextureButton" parent="RefRect/Wordrobe/Pants/PantsGrid"] +[node name="DJShorts" type="TextureButton" parent="Wordrobe/Pants/PantsGrid"] margin_left = 122.0 margin_right = 228.0 margin_bottom = 112.0 texture_normal = ExtResource( 5 ) -[node name="Sweats" type="TextureButton" parent="RefRect/Wordrobe/Pants/PantsGrid"] +[node name="Sweats" type="TextureButton" parent="Wordrobe/Pants/PantsGrid"] margin_left = 232.0 margin_right = 338.0 margin_bottom = 112.0 texture_normal = ExtResource( 6 ) -[node name="Blue Camo Jeans" type="TextureButton" parent="RefRect/Wordrobe/Pants/PantsGrid"] +[node name="BlueCamo Jeans" type="TextureButton" parent="Wordrobe/Pants/PantsGrid"] margin_left = 342.0 margin_right = 448.0 margin_bottom = 112.0 texture_normal = ExtResource( 7 ) -[node name="Beat Up Jeans" type="TextureButton" parent="RefRect/Wordrobe/Pants/PantsGrid"] +[node name="BeatUpJeans" type="TextureButton" parent="Wordrobe/Pants/PantsGrid"] margin_left = 452.0 margin_right = 558.0 margin_bottom = 112.0 texture_normal = ExtResource( 8 ) -[node name="Remove Pants" type="Button" parent="RefRect/Wordrobe/Pants/PantsGrid"] +[node name="RemovePants" type="Button" parent="Wordrobe/Pants/PantsGrid"] margin_top = 116.0 margin_right = 118.0 margin_bottom = 234.0 @@ -123,83 +115,83 @@ custom_colors/font_color_pressed = Color( 0, 0, 0, 1 ) icon = ExtResource( 9 ) flat = true -[node name="Shirts" type="Tabs" parent="RefRect/Wordrobe"] +[node name="Shirts" type="Tabs" parent="Wordrobe"] visible = false anchor_right = 1.0 anchor_bottom = 1.0 margin_top = 29.0 -[node name="ShirtsGrid" type="GridContainer" parent="RefRect/Wordrobe/Shirts"] +[node name="ShirtsGrid" type="GridContainer" parent="Wordrobe/Shirts"] margin_left = 82.0 margin_top = 8.0 margin_right = 556.0 margin_bottom = 441.0 columns = 5 -[node name="Sweatshirt" type="TextureButton" parent="RefRect/Wordrobe/Shirts/ShirtsGrid"] +[node name="Sweatshirt" type="TextureButton" parent="Wordrobe/Shirts/ShirtsGrid"] margin_right = 118.0 margin_bottom = 115.0 texture_normal = ExtResource( 10 ) -[node name="DJ Shirt" type="TextureButton" parent="RefRect/Wordrobe/Shirts/ShirtsGrid"] +[node name="DJShirt" type="TextureButton" parent="Wordrobe/Shirts/ShirtsGrid"] margin_left = 122.0 margin_right = 207.0 margin_bottom = 115.0 texture_normal = ExtResource( 11 ) -[node name="Raw" type="TextureButton" parent="RefRect/Wordrobe/Shirts/ShirtsGrid"] +[node name="Raw" type="TextureButton" parent="Wordrobe/Shirts/ShirtsGrid"] margin_left = 211.0 margin_right = 296.0 margin_bottom = 115.0 texture_normal = ExtResource( 12 ) -[node name="Atomic" type="TextureButton" parent="RefRect/Wordrobe/Shirts/ShirtsGrid"] +[node name="Atomic" type="TextureButton" parent="Wordrobe/Shirts/ShirtsGrid"] margin_left = 300.0 margin_right = 385.0 margin_bottom = 115.0 texture_normal = ExtResource( 13 ) -[node name="Z Shirt" type="TextureButton" parent="RefRect/Wordrobe/Shirts/ShirtsGrid"] +[node name="ZShirt" type="TextureButton" parent="Wordrobe/Shirts/ShirtsGrid"] margin_left = 389.0 margin_right = 474.0 margin_bottom = 115.0 texture_normal = ExtResource( 14 ) -[node name="Biker Jacket" type="TextureButton" parent="RefRect/Wordrobe/Shirts/ShirtsGrid"] +[node name="BikerJacket" type="TextureButton" parent="Wordrobe/Shirts/ShirtsGrid"] margin_top = 119.0 margin_right = 118.0 margin_bottom = 234.0 texture_normal = ExtResource( 15 ) -[node name="NL Jacket" type="TextureButton" parent="RefRect/Wordrobe/Shirts/ShirtsGrid"] +[node name="NLJacket" type="TextureButton" parent="Wordrobe/Shirts/ShirtsGrid"] margin_left = 122.0 margin_top = 119.0 margin_right = 207.0 margin_bottom = 234.0 texture_normal = ExtResource( 16 ) -[node name="Train Hoodie" type="TextureButton" parent="RefRect/Wordrobe/Shirts/ShirtsGrid"] +[node name="TrainHoodie" type="TextureButton" parent="Wordrobe/Shirts/ShirtsGrid"] margin_left = 211.0 margin_top = 119.0 margin_right = 296.0 margin_bottom = 234.0 texture_normal = ExtResource( 17 ) -[node name="Korm Shirt" type="TextureButton" parent="RefRect/Wordrobe/Shirts/ShirtsGrid"] +[node name="KormShirt" type="TextureButton" parent="Wordrobe/Shirts/ShirtsGrid"] margin_left = 300.0 margin_top = 119.0 margin_right = 385.0 margin_bottom = 234.0 texture_normal = ExtResource( 18 ) -[node name="What's New Shirt" type="TextureButton" parent="RefRect/Wordrobe/Shirts/ShirtsGrid"] +[node name="WhatsNewShirt" type="TextureButton" parent="Wordrobe/Shirts/ShirtsGrid"] margin_left = 389.0 margin_top = 119.0 margin_right = 474.0 margin_bottom = 234.0 texture_normal = ExtResource( 19 ) -[node name="Remove Shirt" type="Button" parent="RefRect/Wordrobe/Shirts/ShirtsGrid"] +[node name="RemoveShirt" type="Button" parent="Wordrobe/Shirts/ShirtsGrid"] margin_top = 238.0 margin_right = 118.0 margin_bottom = 356.0 @@ -211,60 +203,61 @@ custom_colors/font_color_pressed = Color( 0, 0, 0, 1 ) icon = ExtResource( 9 ) flat = true -[node name="Underwear" type="Tabs" parent="RefRect/Wordrobe"] +[node name="Underwear" type="Tabs" parent="Wordrobe"] visible = false anchor_right = 1.0 anchor_bottom = 1.0 margin_top = 29.0 -[node name="UndiesGrid" type="GridContainer" parent="RefRect/Wordrobe/Underwear"] +[node name="UndiesGrid" type="GridContainer" parent="Wordrobe/Underwear"] margin_left = 68.0 margin_top = 10.0 margin_right = 585.0 margin_bottom = 451.0 columns = 5 -[node name="OwO Censor" type="TextureButton" parent="RefRect/Wordrobe/Underwear/UndiesGrid"] +[node name="OwOCensor" type="TextureButton" parent="Wordrobe/Underwear/UndiesGrid"] margin_right = 106.0 margin_bottom = 112.0 texture_normal = ExtResource( 20 ) -[node name="Briefs" type="TextureButton" parent="RefRect/Wordrobe/Underwear/UndiesGrid"] +[node name="Briefs" type="TextureButton" parent="Wordrobe/Underwear/UndiesGrid"] margin_left = 110.0 margin_right = 216.0 margin_bottom = 112.0 texture_normal = ExtResource( 21 ) -[node name="ZBriefs" type="TextureButton" parent="RefRect/Wordrobe/Underwear/UndiesGrid"] +[node name="ZBriefs" type="TextureButton" parent="Wordrobe/Underwear/UndiesGrid"] margin_left = 220.0 margin_right = 326.0 margin_bottom = 112.0 texture_normal = ExtResource( 22 ) -[node name="Fundosi" type="TextureButton" parent="RefRect/Wordrobe/Underwear/UndiesGrid"] +[node name="Fundosi" type="TextureButton" parent="Wordrobe/Underwear/UndiesGrid"] margin_left = 330.0 margin_right = 436.0 margin_bottom = 112.0 texture_normal = ExtResource( 23 ) -[node name="Accessoires" type="Tabs" parent="RefRect/Wordrobe"] +[node name="Accessoires" type="Tabs" parent="Wordrobe"] +visible = false anchor_right = 1.0 anchor_bottom = 1.0 margin_top = 29.0 -[node name="AccessoiresGrid" type="GridContainer" parent="RefRect/Wordrobe/Accessoires"] +[node name="AccessoiresGrid" type="GridContainer" parent="Wordrobe/Accessoires"] margin_left = 85.0 margin_top = 14.0 margin_right = 556.0 margin_bottom = 458.0 columns = 5 -[node name="Camera" type="TextureButton" parent="RefRect/Wordrobe/Accessoires/AccessoiresGrid"] +[node name="CanonCam" type="TextureButton" parent="Wordrobe/Accessoires/AccessoiresGrid"] margin_right = 85.0 margin_bottom = 118.0 texture_normal = ExtResource( 24 ) -[node name="Remove Accessory" type="Button" parent="RefRect/Wordrobe/Accessoires/AccessoiresGrid"] +[node name="RemoveAccessory" type="Button" parent="Wordrobe/Accessoires/AccessoiresGrid"] margin_left = 89.0 margin_right = 207.0 margin_bottom = 118.0 @@ -290,7 +283,7 @@ margin_right = -310.753 margin_bottom = -30.9396 [node name="Undies" type="Sprite" parent="Body"] -position = Vector2( 57.9419, 159.296 ) +position = Vector2( 56.9419, 154.296 ) texture = ExtResource( 21 ) [node name="Bottom" type="Sprite" parent="Body"] @@ -304,26 +297,22 @@ texture = ExtResource( 27 ) [node name="Accessory" type="Sprite" parent="Body"] position = Vector2( 65.0597, 65.3242 ) texture = ExtResource( 27 ) -[connection signal="pressed" from="RefRect/Wordrobe/Pants/PantsGrid/Jeans" to="." method="_on_Jeans_pressed"] -[connection signal="pressed" from="RefRect/Wordrobe/Pants/PantsGrid/DJ Shorts" to="." method="_on_DJ_Shorts_pressed"] -[connection signal="pressed" from="RefRect/Wordrobe/Pants/PantsGrid/Sweats" to="." method="_on_Sweats_pressed"] -[connection signal="pressed" from="RefRect/Wordrobe/Pants/PantsGrid/Blue Camo Jeans" to="." method="_on_Blue_Camo_Jeans_pressed"] -[connection signal="pressed" from="RefRect/Wordrobe/Pants/PantsGrid/Beat Up Jeans" to="." method="_on_Beat_Up_Jeans_pressed"] -[connection signal="pressed" from="RefRect/Wordrobe/Pants/PantsGrid/Remove Pants" to="." method="_on_Remove_Pants_pressed"] -[connection signal="pressed" from="RefRect/Wordrobe/Shirts/ShirtsGrid/Sweatshirt" to="." method="_on_Sweatshirt_pressed"] -[connection signal="pressed" from="RefRect/Wordrobe/Shirts/ShirtsGrid/DJ Shirt" to="." method="_on_DJ_Shirt_pressed"] -[connection signal="pressed" from="RefRect/Wordrobe/Shirts/ShirtsGrid/Raw" to="." method="_on_Raw_pressed"] -[connection signal="pressed" from="RefRect/Wordrobe/Shirts/ShirtsGrid/Atomic" to="." method="_on_Atomic_pressed"] -[connection signal="pressed" from="RefRect/Wordrobe/Shirts/ShirtsGrid/Z Shirt" to="." method="_on_Z_Shirt_pressed"] -[connection signal="pressed" from="RefRect/Wordrobe/Shirts/ShirtsGrid/Biker Jacket" to="." method="_on_Biker_Jacket_pressed"] -[connection signal="pressed" from="RefRect/Wordrobe/Shirts/ShirtsGrid/NL Jacket" to="." method="_on_NL_Jacket_pressed"] -[connection signal="pressed" from="RefRect/Wordrobe/Shirts/ShirtsGrid/Train Hoodie" to="." method="_on_Train_Hoodie_pressed"] -[connection signal="pressed" from="RefRect/Wordrobe/Shirts/ShirtsGrid/Korm Shirt" to="." method="_on_Korm_Shirt_pressed"] -[connection signal="pressed" from="RefRect/Wordrobe/Shirts/ShirtsGrid/What's New Shirt" to="." method="_on_Whats_New_Shirt_pressed"] -[connection signal="pressed" from="RefRect/Wordrobe/Shirts/ShirtsGrid/Remove Shirt" to="." method="_on_Remove_Shirt_pressed"] -[connection signal="pressed" from="RefRect/Wordrobe/Underwear/UndiesGrid/OwO Censor" to="." method="_on_OwO_Censor_pressed"] -[connection signal="pressed" from="RefRect/Wordrobe/Underwear/UndiesGrid/Briefs" to="." method="_on_Briefs_pressed"] -[connection signal="pressed" from="RefRect/Wordrobe/Underwear/UndiesGrid/ZBriefs" to="." method="_on_ZBriefs_pressed"] -[connection signal="pressed" from="RefRect/Wordrobe/Underwear/UndiesGrid/Fundosi" to="." method="_on_Fundosi_pressed"] -[connection signal="pressed" from="RefRect/Wordrobe/Accessoires/AccessoiresGrid/Camera" to="." method="_on_Camera_pressed"] -[connection signal="pressed" from="RefRect/Wordrobe/Accessoires/AccessoiresGrid/Remove Accessory" to="." method="_on_Remove_Accessory_pressed"] +[connection signal="pressed" from="Wordrobe/Pants/PantsGrid/BlueCamo Jeans" to="." method="_on_Blue_Camo_Jeans_pressed"] +[connection signal="pressed" from="Wordrobe/Pants/PantsGrid/BeatUpJeans" to="." method="_on_Beat_Up_Jeans_pressed"] +[connection signal="pressed" from="Wordrobe/Pants/PantsGrid/RemovePants" to="." method="_on_Remove_Pants_pressed"] +[connection signal="pressed" from="Wordrobe/Shirts/ShirtsGrid/Sweatshirt" to="." method="_on_Sweatshirt_pressed"] +[connection signal="pressed" from="Wordrobe/Shirts/ShirtsGrid/DJShirt" to="." method="_on_DJ_Shirt_pressed"] +[connection signal="pressed" from="Wordrobe/Shirts/ShirtsGrid/Raw" to="." method="_on_Raw_pressed"] +[connection signal="pressed" from="Wordrobe/Shirts/ShirtsGrid/Atomic" to="." method="_on_Atomic_pressed"] +[connection signal="pressed" from="Wordrobe/Shirts/ShirtsGrid/ZShirt" to="." method="_on_Z_Shirt_pressed"] +[connection signal="pressed" from="Wordrobe/Shirts/ShirtsGrid/BikerJacket" to="." method="_on_Biker_Jacket_pressed"] +[connection signal="pressed" from="Wordrobe/Shirts/ShirtsGrid/NLJacket" to="." method="_on_NL_Jacket_pressed"] +[connection signal="pressed" from="Wordrobe/Shirts/ShirtsGrid/TrainHoodie" to="." method="_on_Train_Hoodie_pressed"] +[connection signal="pressed" from="Wordrobe/Shirts/ShirtsGrid/KormShirt" to="." method="_on_Korm_Shirt_pressed"] +[connection signal="pressed" from="Wordrobe/Shirts/ShirtsGrid/WhatsNewShirt" to="." method="_on_Whats_New_Shirt_pressed"] +[connection signal="pressed" from="Wordrobe/Shirts/ShirtsGrid/RemoveShirt" to="." method="_on_Remove_Shirt_pressed"] +[connection signal="pressed" from="Wordrobe/Underwear/UndiesGrid/OwOCensor" to="." method="_on_OwO_Censor_pressed"] +[connection signal="pressed" from="Wordrobe/Underwear/UndiesGrid/Briefs" to="." method="_on_Briefs_pressed"] +[connection signal="pressed" from="Wordrobe/Underwear/UndiesGrid/ZBriefs" to="." method="_on_ZBriefs_pressed"] +[connection signal="pressed" from="Wordrobe/Underwear/UndiesGrid/Fundosi" to="." method="_on_Fundosi_pressed"] +[connection signal="pressed" from="Wordrobe/Accessoires/AccessoiresGrid/RemoveAccessory" to="." method="_on_Remove_Accessory_pressed"] diff --git a/project/scn/ModernScn.tscn b/project/scn/GameScn.tscn similarity index 100% rename from project/scn/ModernScn.tscn rename to project/scn/GameScn.tscn diff --git a/project/scn/TitleScn.tscn b/project/scn/TitleScn.tscn index 9022cc8..90d8b7e 100644 --- a/project/scn/TitleScn.tscn +++ b/project/scn/TitleScn.tscn @@ -1,9 +1,8 @@ -[gd_scene load_steps=5 format=2] +[gd_scene load_steps=4 format=2] [ext_resource path="res://src/TitleScn.gd" type="Script" id=1] [ext_resource path="res://sprites/title.svg" type="Texture" id=2] [ext_resource path="res://scn/WinDialogs.tscn" type="PackedScene" id=3] -[ext_resource path="res://src/Soundtrack.gd" type="Script" id=4] [node name="Start" type="Node"] script = ExtResource( 1 ) @@ -87,9 +86,6 @@ margin_left = 97.0 margin_top = 37.0 margin_right = 97.0 margin_bottom = 37.0 - -[node name="Music" type="AudioStreamPlayer" parent="."] -script = ExtResource( 4 ) [connection signal="pressed" from="MenuRf/StartVbox/PlayBtn" to="." method="_on_PlayBtn_pressed"] [connection signal="pressed" from="MenuRf/StartVbox/CreditsBtn" to="." method="_on_CreditsBtn_pressed"] [connection signal="pressed" from="MenuRf/StartVbox/LicenseBtn" to="." method="_on_LicenseBtn_pressed"] diff --git a/project/sprites/dj_shorts.svg b/project/sprites/dj_shorts.svg new file mode 100644 index 0000000..82c126f --- /dev/null +++ b/project/sprites/dj_shorts.svg @@ -0,0 +1,149 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/project/sprites/dj_shorts.svg.import b/project/sprites/dj_shorts.svg.import new file mode 100644 index 0000000..f7461d6 --- /dev/null +++ b/project/sprites/dj_shorts.svg.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/dj_shorts.svg-e17b87622cd4d462498c5bb9deda7dbb.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://sprites/dj_shorts.svg" +dest_files=[ "res://.import/dj_shorts.svg-e17b87622cd4d462498c5bb9deda7dbb.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/project/sprites/dressup_wardrobe.svg b/project/sprites/dressup_wardrobe.svg index 5a39ecb..afa8b19 100644 --- a/project/sprites/dressup_wardrobe.svg +++ b/project/sprites/dressup_wardrobe.svg @@ -76,7 +76,7 @@ height="519.91699" x="-52.601696" y="3.9362619" - ry="41.281254" /> + ry="31.017717" /> + ry="24.818422" /> + width="612.74677" + height="33.212002" + x="-20.5812" + y="16.057602" + ry="9.6562872" /> diff --git a/project/src/Clothes.gd b/project/src/Clothes.gd index 87c72ef..6eb6f47 100644 --- a/project/src/Clothes.gd +++ b/project/src/Clothes.gd @@ -10,6 +10,20 @@ onready var accessory = load("res://sprites/tops_placeholder.png") # Underwear cam be suggestive but never lewd. onready var undies = load("res://sprites/briefs.svg") +func _process(delta): + + if $Wordrobe/Accessoires/AccessoiresGrid/CanonCam.is_pressed() == true: + change_accessoires(load("res://sprites/camera.png")) + + if $Wordrobe/Pants/PantsGrid/Jeans.is_pressed() == true: + change_bottoms(load("res://sprites/jeans.svg")) + + if $Wordrobe/Pants/PantsGrid/Sweats.is_pressed() == true: + change_bottoms(load("res://sprites/sweat_pants.svg")) + + if $Wordrobe/Pants/PantsGrid/DJShorts.is_pressed() == true: + change_bottoms(load("res://sprites/dj_shorts.svg")) + func change_bottoms(new_bottom): bottoms = new_bottom @@ -51,10 +65,10 @@ func _on_Remove_Accessory_pressed(): change_accessoires(null) func _on_DJ_Shorts_pressed(): - change_bottoms(load("res://sprites/dj_shorts.png")) + change_bottoms(load("res://sprites/dj_shorts.svg")) func _on_ZBriefs_pressed(): - change_undies(load("res://sprites/z_briefs.png")) + change_undies(load("res://sprites/z_briefs.svg")) func _on_Briefs_pressed(): change_undies(load("res://sprites/briefs.svg")) diff --git a/project/src/GameKit.gd b/project/src/GameKit.gd index 0c7786b..0ce7bf5 100644 --- a/project/src/GameKit.gd +++ b/project/src/GameKit.gd @@ -12,6 +12,6 @@ func switch_scenes(new_mode): if new_mode == "classic": get_tree().change_scene("res://scn/ClassicScn.tscn") elif new_mode == "modern": - get_tree().change_scene("res://scn/ModernScn.tscn") + get_tree().change_scene("res://scn/GameScn.tscn") elif new_mode == "title": get_tree().change_scene("res://scn/TitleScn.tscn") \ No newline at end of file diff --git a/project/src/Soundtrack.gd b/project/src/Soundtrack.gd index d385d7b..24e401c 100644 --- a/project/src/Soundtrack.gd +++ b/project/src/Soundtrack.gd @@ -5,7 +5,7 @@ const tracks = [ 'together_again', 'at_the_lake', ] -# Called when the node enters the scene tree for the first time. + func _ready(): connect("finished", self, "play_random_song") play_random_song() @@ -15,8 +15,5 @@ func play_random_song(): var rand_db = randi() % tracks.size() var audiostream = load('res://music/' + tracks[rand_db] + '.ogg') - set_stream(audiostream) - play() - - - \ No newline at end of file + stream = audiostream + play() \ No newline at end of file