diff --git a/lang/local.en.translation b/lang/local.en.translation index 8889f17..267283c 100644 Binary files a/lang/local.en.translation and b/lang/local.en.translation differ diff --git a/lang/local.sv.translation b/lang/local.sv.translation index 12777ef..41ad3f7 100644 Binary files a/lang/local.sv.translation and b/lang/local.sv.translation differ diff --git a/project.godot b/project.godot index a1a4379..799018e 100644 --- a/project.godot +++ b/project.godot @@ -8,9 +8,14 @@ config_version=4 -_global_script_classes=[ ] +_global_script_classes=[ { +"base": "Resource", +"class": "Character", +"language": "GDScript", +"path": "res://scripts/character.gd" +} ] _global_script_class_icons={ - +"Character": "" } [application] @@ -45,7 +50,7 @@ window/stretch/aspect="keep" [gui] -theme/custom="res://styles/Game.theme" +theme/custom="res://resources/Game.theme" theme/custom_font="res://fonts/montserrat_extra_bold_16.tres" [importer_defaults] diff --git a/resources/Game.theme b/resources/Game.theme new file mode 100644 index 0000000..8f65826 Binary files /dev/null and b/resources/Game.theme differ diff --git a/styles/KBlueBtnDisabled.tres b/resources/KBlueBtnDisabled.tres similarity index 100% rename from styles/KBlueBtnDisabled.tres rename to resources/KBlueBtnDisabled.tres diff --git a/styles/KBlueBtnNormal.tres b/resources/KBlueBtnNormal.tres similarity index 100% rename from styles/KBlueBtnNormal.tres rename to resources/KBlueBtnNormal.tres diff --git a/styles/KBlueBtnPressed.tres b/resources/KBlueBtnPressed.tres similarity index 100% rename from styles/KBlueBtnPressed.tres rename to resources/KBlueBtnPressed.tres diff --git a/styles/KGreyPanel.tres b/resources/KGreyPanel.tres similarity index 100% rename from styles/KGreyPanel.tres rename to resources/KGreyPanel.tres diff --git a/resources/character.tres b/resources/character.tres new file mode 100644 index 0000000..a61bf7c --- /dev/null +++ b/resources/character.tres @@ -0,0 +1,6 @@ +[gd_resource type="Resource" load_steps=2 format=2] + +[ext_resource path="res://scripts/character.gd" type="Script" id=1] + +[resource] +script = ExtResource( 1 ) diff --git a/scenes/Clothes.tscn b/scenes/Clothes.tscn index 223aa57..e5f7a6b 100644 --- a/scenes/Clothes.tscn +++ b/scenes/Clothes.tscn @@ -1,5 +1,6 @@ [gd_scene load_steps=23 format=2] +[ext_resource path="res://scenes/clothing/camera.tscn" type="PackedScene" id=1] [ext_resource path="res://sprites/clothes/jeans.svg" type="Texture" id=3] [ext_resource path="res://sprites/clothes/blue_skirt.svg" type="Texture" id=4] [ext_resource path="res://sprites/clothes/sweat_pants.svg" type="Texture" id=5] @@ -21,7 +22,6 @@ [ext_resource path="res://sprites/clothes/briefs.svg" type="Texture" id=21] [ext_resource path="res://sprites/clothes/z_briefs.svg" type="Texture" id=22] [ext_resource path="res://sprites/clothes/fundosi.svg" type="Texture" id=23] -[ext_resource path="res://sprites/clothes/camera.png" type="Texture" id=24] [node name="Wordrobe" type="TabContainer"] anchor_right = 1.0 @@ -36,10 +36,10 @@ __meta__ = { [node name="Pants" type="Tabs" parent="."] anchor_right = 1.0 anchor_bottom = 1.0 -margin_left = 5.0 -margin_top = 41.0 -margin_right = -5.0 -margin_bottom = -10.0 +margin_left = 4.0 +margin_top = 39.0 +margin_right = -4.0 +margin_bottom = -4.0 custom_constants/hseparation = 0 [node name="PantsScroll" type="ScrollContainer" parent="Pants"] @@ -50,7 +50,7 @@ __meta__ = { } [node name="PantsGrid" type="GridContainer" parent="Pants/PantsScroll"] -margin_right = 790.0 +margin_right = 792.0 margin_bottom = 228.0 size_flags_horizontal = 3 columns = 4 @@ -103,10 +103,10 @@ texture_normal = ExtResource( 9 ) visible = false anchor_right = 1.0 anchor_bottom = 1.0 -margin_left = 5.0 -margin_top = 41.0 -margin_right = -5.0 -margin_bottom = -10.0 +margin_left = 4.0 +margin_top = 39.0 +margin_right = -4.0 +margin_bottom = -4.0 [node name="ShirtsScroll" type="ScrollContainer" parent="Shirts"] anchor_right = 1.0 @@ -115,8 +115,8 @@ margin_left = 10.0 margin_top = 10.0 [node name="ShirtsGrid" type="GridContainer" parent="Shirts/ShirtsScroll"] -margin_right = 780.0 -margin_bottom = 365.0 +margin_right = 782.0 +margin_bottom = 356.0 size_flags_horizontal = 3 columns = 4 @@ -200,17 +200,17 @@ flat = true visible = false anchor_right = 1.0 anchor_bottom = 1.0 -margin_left = 5.0 -margin_top = 41.0 -margin_right = -5.0 -margin_bottom = -10.0 +margin_left = 4.0 +margin_top = 39.0 +margin_right = -4.0 +margin_bottom = -4.0 [node name="UndiesScroll" type="ScrollContainer" parent="Underwear"] anchor_right = 1.0 anchor_bottom = 1.0 [node name="UndiesGrid" type="GridContainer" parent="Underwear/UndiesScroll"] -margin_right = 790.0 +margin_right = 792.0 margin_bottom = 228.0 size_flags_horizontal = 3 columns = 3 @@ -242,10 +242,10 @@ texture_normal = ExtResource( 23 ) visible = false anchor_right = 1.0 anchor_bottom = 1.0 -margin_left = 5.0 -margin_top = 41.0 -margin_right = -5.0 -margin_bottom = -10.0 +margin_left = 4.0 +margin_top = 39.0 +margin_right = -4.0 +margin_bottom = -4.0 [node name="AccsScroll" type="ScrollContainer" parent="Accessoires"] margin_left = 19.0 @@ -255,23 +255,7 @@ margin_bottom = 494.0 [node name="AccsGrid" type="GridContainer" parent="Accessoires/AccsScroll"] margin_right = 350.0 -margin_bottom = 127.0 size_flags_horizontal = 3 columns = 3 -[node name="CanonCam" type="TextureButton" parent="Accessoires/AccsScroll/AccsGrid"] -margin_right = 85.0 -margin_bottom = 112.0 -texture_normal = ExtResource( 24 ) - -[node name="RemoveAccessory" type="Button" parent="Accessoires/AccsScroll/AccsGrid"] -margin_left = 89.0 -margin_right = 195.0 -margin_bottom = 112.0 -rect_min_size = Vector2( 85, 105 ) -custom_colors/font_color_disabled = Color( 0, 0, 0, 1 ) -custom_colors/font_color = Color( 0, 0, 0, 1 ) -custom_colors/font_color_hover = Color( 0, 0, 0, 1 ) -custom_colors/font_color_pressed = Color( 0, 0, 0, 1 ) -icon = ExtResource( 9 ) -flat = true +[node name="accessoryBase" parent="Accessoires/AccsScroll/AccsGrid" instance=ExtResource( 1 )] diff --git a/scenes/Character.tscn b/scenes/characterBase.tscn similarity index 97% rename from scenes/Character.tscn rename to scenes/characterBase.tscn index afe085b..bcdb1b2 100644 --- a/scenes/Character.tscn +++ b/scenes/characterBase.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=30 format=2] -[ext_resource path="res://scripts/Character.gd" type="Script" id=1] +[ext_resource path="res://scripts/characterBase.gd" type="Script" id=1] [ext_resource path="res://sprites/character/tail/tail0.svg" type="Texture" id=2] [ext_resource path="res://sprites/character/tail/tail1.svg" type="Texture" id=3] [ext_resource path="res://sprites/character/tail/tail2.svg" type="Texture" id=4] @@ -27,9 +27,6 @@ [ext_resource path="res://sprites/clothes/bottoms_placeholder.png" type="Texture" id=25] [ext_resource path="res://sprites/clothes/tops_placeholder.png" type="Texture" id=26] - - - [sub_resource type="SpriteFrames" id=1] animations = [ { "frames": [ ExtResource( 2 ), ExtResource( 2 ), ExtResource( 2 ), ExtResource( 3 ), ExtResource( 3 ), ExtResource( 3 ), ExtResource( 4 ), ExtResource( 4 ), ExtResource( 4 ) ], @@ -54,7 +51,7 @@ animations = [ { "speed": 10.0 } ] -[node name="Character" type="Node2D"] +[node name="characterBase" type="Node2D"] script = ExtResource( 1 ) [node name="Base" type="Node2D" parent="."] @@ -62,7 +59,7 @@ script = ExtResource( 1 ) [node name="Tail" type="AnimatedSprite" parent="Base"] position = Vector2( 54.4027, 184.439 ) frames = SubResource( 1 ) -frame = 7 +frame = 3 playing = true [node name="Tony" type="Sprite" parent="Base"] @@ -72,13 +69,13 @@ texture = ExtResource( 5 ) [node name="Eyes" type="AnimatedSprite" parent="Base"] position = Vector2( 114.227, 63.9224 ) frames = SubResource( 2 ) -frame = 1 +frame = 18 playing = true [node name="Mouth" type="AnimatedSprite" parent="Base"] position = Vector2( 131.024, 67.4964 ) frames = SubResource( 3 ) -frame = 11 +frame = 7 playing = true [node name="Undies" type="Sprite" parent="."] diff --git a/scenes/clothing/accessoryBase.tscn b/scenes/clothing/accessoryBase.tscn new file mode 100644 index 0000000..1989cbe --- /dev/null +++ b/scenes/clothing/accessoryBase.tscn @@ -0,0 +1,8 @@ +[gd_scene load_steps=3 format=2] + +[ext_resource path="res://scenes/clothing/baseClothing.tscn" type="PackedScene" id=1] +[ext_resource path="res://scripts/accessoryBase.gd" type="Script" id=2] + +[node name="accessoryBase" instance=ExtResource( 1 )] +script = ExtResource( 2 ) +[connection signal="pressed" from="clothing" to="." method="_on_accessory_pressed"] diff --git a/scenes/clothing/baseClothing.tscn b/scenes/clothing/baseClothing.tscn new file mode 100644 index 0000000..ae05ca9 --- /dev/null +++ b/scenes/clothing/baseClothing.tscn @@ -0,0 +1,15 @@ +[gd_scene load_steps=2 format=2] + +[ext_resource path="res://scripts/baseClothing.gd" type="Script" id=1] + +[node name="baseClothing" type="Control"] +script = ExtResource( 1 ) +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="clothing" type="TextureButton" parent="."] +rect_min_size = Vector2( 106, 112 ) +__meta__ = { +"_edit_use_anchors_": false +} diff --git a/scenes/clothing/camera.tscn b/scenes/clothing/camera.tscn new file mode 100644 index 0000000..8231507 --- /dev/null +++ b/scenes/clothing/camera.tscn @@ -0,0 +1,10 @@ +[gd_scene load_steps=3 format=2] + +[ext_resource path="res://scenes/clothing/accessoryBase.tscn" type="PackedScene" id=1] +[ext_resource path="res://sprites/clothes/camera.png" type="Texture" id=2] + +[node name="accessoryBase" instance=ExtResource( 1 )] + +[node name="clothing" parent="." index="0"] +rect_min_size = Vector2( 106, 112 ) +texture_normal = ExtResource( 2 ) diff --git a/scenes/clothing/undiesBase.tscn b/scenes/clothing/undiesBase.tscn new file mode 100644 index 0000000..a378b51 --- /dev/null +++ b/scenes/clothing/undiesBase.tscn @@ -0,0 +1,8 @@ +[gd_scene load_steps=3 format=2] + +[ext_resource path="res://scenes/clothing/baseClothing.tscn" type="PackedScene" id=1] +[ext_resource path="res://scripts/undiesBase.gd" type="Script" id=2] + +[node name="baseClothing" instance=ExtResource( 1 )] +script = ExtResource( 2 ) +[connection signal="pressed" from="clothing" to="." method="_on_undies_pressed"] diff --git a/scenes/game.tscn b/scenes/game.tscn index b00fd88..141126f 100644 --- a/scenes/game.tscn +++ b/scenes/game.tscn @@ -1,14 +1,12 @@ -[gd_scene load_steps=7 format=2] +[gd_scene load_steps=6 format=2] -[ext_resource path="res://scripts/GameScn.gd" type="Script" id=1] +[ext_resource path="res://scenes/characterBase.tscn" type="PackedScene" id=1] [ext_resource path="res://scenes/pause.tscn" type="PackedScene" id=2] -[ext_resource path="res://scenes/character.tscn" type="PackedScene" id=3] [ext_resource path="res://scenes/clothes.tscn" type="PackedScene" id=4] [ext_resource path="res://sprites/clothes/icrazy_frame.svg" type="Texture" id=5] [ext_resource path="res://sprites/clothes/lights.png" type="Texture" id=6] [node name="GameScreen" type="Node2D"] -script = ExtResource( 1 ) [node name="PicFrame" type="Sprite" parent="."] position = Vector2( 163.773, 119.752 ) @@ -21,8 +19,8 @@ __meta__ = { position = Vector2( 35.118, -14.56 ) texture = ExtResource( 6 ) -[node name="Character" parent="." instance=ExtResource( 3 )] -position = Vector2( 61.8154, 246.831 ) +[node name="characterBase" parent="." instance=ExtResource( 1 )] +position = Vector2( 43, 250 ) [node name="UI" type="CanvasLayer" parent="."] diff --git a/scripts/Character.gd b/scripts/Character.gd index 49167e9..8a16630 100644 --- a/scripts/Character.gd +++ b/scripts/Character.gd @@ -1,15 +1,7 @@ -# Anthony Wilcox licenses this file to you under the MPL license. -# See the LICENSE file in the project root for more information. -extends Node2D +extends Resource +class_name Character -# 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 +var top = null +var bottom = null +var underwear = null +var accessory = null diff --git a/scripts/GameScn.gd b/scripts/GameScn.gd index 4203251..6e137c3 100644 --- a/scripts/GameScn.gd +++ b/scripts/GameScn.gd @@ -16,7 +16,6 @@ onready var accessories_placeholder = load("res://sprites/clothes/tops_placehold onready var bottoms = $Character/Bottom onready var tops = $Character/Top -onready var accessory = $Character/Accessory # var UndiesBtn = load("res://scenes/Clothing.tscenes") # @@ -50,15 +49,15 @@ func change_tops(new_top): tops.texture = tops_placeholder UserSettings.Tops = tops_placeholder -func change_accessoires(new_accessory): - accessories_placeholder = new_accessory - - if new_accessory == null: - accessory.texture = accessories_placeholder - UserSettings.Accessory = accessories_placeholder - - accessory.texture = accessories_placeholder - UserSettings.Accessory = accessories_placeholder +#func change_accessoires(new_accessory): +# accessories_placeholder = new_accessory +# +# if new_accessory == null: +# accessory.texture = accessories_placeholder +# UserSettings.Accessory = accessories_placeholder +# +# accessory.texture = accessories_placeholder +# UserSettings.Accessory = accessories_placeholder #func init_underwear(): # var undiesFile = File.new() @@ -76,8 +75,8 @@ func _process(delta): # Change clothes # =========================================================== - if $UI/Base/Wordrobe/Accessoires/AccsScroll/AccsGrid/CanonCam.is_pressed(): - change_accessoires(load("res://sprites/clothes/camera.png")) +# if $UI/Base/Wordrobe/Accessoires/AccsScroll/AccsGrid/CanonCam.is_pressed(): +# change_accessoires(load("res://sprites/clothes/camera.png")) if $UI/Base/Wordrobe/Pants/PantsScroll/PantsGrid/Jeans.is_pressed(): change_bottoms(load("res://sprites/clothes/jeans.svg")) @@ -144,8 +143,8 @@ func _process(delta): # Remove clothes # =========================================================== - if $UI/Base/Wordrobe/Accessoires/AccsScroll/AccsGrid/RemoveAccessory.is_pressed(): - change_accessoires(null) +# if $UI/Base/Wordrobe/Accessoires/AccsScroll/AccsGrid/RemoveAccessory.is_pressed(): +# change_accessoires(null) if $UI/Base/Wordrobe/Shirts/ShirtsScroll/ShirtsGrid/RemoveShirt.is_pressed(): change_tops(null) diff --git a/scripts/UserSettings.gd b/scripts/UserSettings.gd index 7171f99..09759ce 100644 --- a/scripts/UserSettings.gd +++ b/scripts/UserSettings.gd @@ -6,4 +6,4 @@ var Tops: Texture var Bottoms: Texture var Underwear: Texture var Accessory: Texture -var IsMusicPaused: bool \ No newline at end of file +var IsMusicPaused: bool diff --git a/scripts/accessoryBase.gd b/scripts/accessoryBase.gd new file mode 100644 index 0000000..be95970 --- /dev/null +++ b/scripts/accessoryBase.gd @@ -0,0 +1,7 @@ +extends "res://scripts/baseClothing.gd" + +onready var character = preload("res://resources/character.tres") +onready var clothing = $clothing + +func _on_accessory_pressed(): + character.accessory = clothing.texture_normal diff --git a/scripts/baseClothing.gd b/scripts/baseClothing.gd new file mode 100644 index 0000000..a9f2075 --- /dev/null +++ b/scripts/baseClothing.gd @@ -0,0 +1,2 @@ +extends Control + diff --git a/scripts/characterBase.gd b/scripts/characterBase.gd new file mode 100644 index 0000000..bf9f32f --- /dev/null +++ b/scripts/characterBase.gd @@ -0,0 +1,10 @@ +# Anthony Wilcox licenses this file to you under the MPL license. +# See the LICENSE file in the project root for more information. +extends Node2D + +onready var character = preload("res://resources/character.tres") +onready var accessory = $Accessory + +func _process(delta): + if character.accessory != null: + accessory.texture = character.accessory diff --git a/scripts/undiesBase.gd b/scripts/undiesBase.gd new file mode 100644 index 0000000..5358a38 --- /dev/null +++ b/scripts/undiesBase.gd @@ -0,0 +1,7 @@ +extends "res://scripts/baseClothing.gd" + +onready var character = preload("res://resources/character.tres") +onready var clothing = $clothing + +func _on_undies_pressed(): + character.underwear = clothing.texture_normal diff --git a/styles/Game.theme b/styles/Game.theme deleted file mode 100644 index 0835f34..0000000 Binary files a/styles/Game.theme and /dev/null differ