1
0
Fork 0
mirror of https://github.com/tonytins/dressupzack synced 2025-06-26 00:24:44 -04:00

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
This commit is contained in:
Anthony Wilcox 2019-05-05 12:07:27 -04:00
parent 2ac38db54d
commit 023f6ec90e
9 changed files with 269 additions and 90 deletions

View file

@ -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"]

View file

@ -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"]