diff --git a/src/scenes/game.tscn b/src/scenes/game.tscn index 06838f2..24f810f 100644 --- a/src/scenes/game.tscn +++ b/src/scenes/game.tscn @@ -1,11 +1,13 @@ -[gd_scene load_steps=33 format=3 uid="uid://cvr2aries2lhr"] +[gd_scene load_steps=36 format=3 uid="uid://cvr2aries2lhr"] [ext_resource type="Script" path="res://src/scripts/game.gd" id="1_qt3fe"] [ext_resource type="Texture2D" uid="uid://33g80p0qnfw4" path="res://src/sprites/world/background.svg" id="1_uee2i"] [ext_resource type="AudioStream" uid="uid://b01v3d3npeyt1" path="res://src/sounds/kenny_ui_sounds/click_001.wav" id="2_0ca4n"] [ext_resource type="Texture2D" uid="uid://bi7ayrxnn7hex" path="res://src/sprites/world/icrazy_frame.svg" id="2_n1kmf"] [ext_resource type="AudioStream" uid="uid://dd1xw5yy6ckcg" path="res://src/sounds/kenny_ui_sounds/click_002.wav" id="3_who0m"] +[ext_resource type="AudioStream" uid="uid://cqtk1nmij02ue" path="res://src/sounds/kenny_ui_sounds/switch_004.wav" id="4_1vpui"] [ext_resource type="Texture2D" uid="uid://d1u3w61r0uv7p" path="res://src/sprites/world/boxersOfAmericaFrame.png" id="4_327cy"] +[ext_resource type="AudioStream" uid="uid://y4amvcp0iak4" path="res://src/sounds/fan.ogg" id="4_ce266"] [ext_resource type="PackedScene" uid="uid://detf8uwimqp3v" path="res://src/scenes/character.tscn" id="6_tdil0"] [ext_resource type="SpriteFrames" uid="uid://bhyon1s1op8ly" path="res://src/scenes/items.tres" id="7_3ykci"] [ext_resource type="Texture2D" uid="uid://d1ebnalp5ubm5" path="res://src/sprites/world/fan/fan0001.png" id="8_op8gm"] @@ -31,6 +33,7 @@ [ext_resource type="Texture2D" uid="uid://u5nmph4ob2rt" path="res://src/sprites/world/fan/fan0013.png" id="20_6cokn"] [ext_resource type="Texture2D" uid="uid://63nrlmta5nbc" path="res://src/sprites/world/fan/fan0014.png" id="21_4g4xp"] [ext_resource type="Texture2D" uid="uid://bewpgbagatqn0" path="res://src/sprites/world/shelf.png" id="22_kss16"] +[ext_resource type="Texture2D" uid="uid://b5vt6y7uf4fi1" path="res://src/sprites/world/fan-button.png" id="33_oenpt"] [sub_resource type="SpriteFrames" id="SpriteFrames_wfogq"] animations = [{ @@ -79,7 +82,7 @@ animations = [{ }], "loop": true, "name": &"default", -"speed": 10.0 +"speed": 100.0 }] [node name="Game" type="Node"] @@ -91,6 +94,12 @@ stream = ExtResource("2_0ca4n") [node name="BackClick" type="AudioStreamPlayer" parent="."] stream = ExtResource("3_who0m") +[node name="FanClick" type="AudioStreamPlayer" parent="."] +stream = ExtResource("4_1vpui") + +[node name="FanAsmr" type="AudioStreamPlayer" parent="."] +stream = ExtResource("4_ce266") + [node name="World" type="Node2D" parent="."] [node name="Background" type="Sprite2D" parent="World"] @@ -111,9 +120,6 @@ texture = ExtResource("2_n1kmf") [node name="Fan" type="AnimatedSprite2D" parent="World"] position = Vector2(523.641, 120.505) sprite_frames = SubResource("SpriteFrames_wfogq") -frame = 10 -frame_progress = 0.989141 -speed_scale = 2.0 [node name="Shelf" type="Sprite2D" parent="World"] position = Vector2(522.056, 189.082) @@ -121,6 +127,7 @@ texture = ExtResource("22_kss16") [node name="Character" parent="." instance=ExtResource("6_tdil0")] position = Vector2(291.682, 143.132) +rotation = -0.00207467 [node name="Seperate" type="Node2D" parent="Character"] position = Vector2(-299.61, -133.222) @@ -139,7 +146,7 @@ animation = &"tops" visible = false position = Vector2(-2.43002, 124.632) sprite_frames = ExtResource("7_3ykci") -animation = &"fullbody" +animation = &"outfits" [node name="Canvas" type="CanvasLayer" parent="."] @@ -238,7 +245,6 @@ theme_override_styles/hover = ExtResource("11_a038t") theme_override_styles/pressed = ExtResource("11_a038t") theme_override_styles/disabled = ExtResource("15_0xxs0") theme_override_styles/focus = ExtResource("11_a038t") -disabled = true text = "Outfits" metadata/_edit_use_anchors_ = true @@ -323,6 +329,17 @@ script = ExtResource("12_o3hu5") icon_type = "brands" icon_name = "creative-commons-zero" +[node name="FanBtn" type="TextureButton" parent="Canvas/UI"] +layout_mode = 1 +anchors_preset = -1 +anchor_left = 0.866667 +anchor_top = 0.4075 +anchor_right = 0.88 +anchor_bottom = 0.4225 +toggle_mode = true +texture_normal = ExtResource("33_oenpt") +metadata/_edit_use_anchors_ = true + [connection signal="pressed" from="Canvas/UI/DressUpCtrls/TopsFwdBtn" to="." method="_on_tops_fwd_btn_pressed"] [connection signal="pressed" from="Canvas/UI/DressUpCtrls/TopsBckBtn" to="." method="_on_tops_bck_btn_pressed"] [connection signal="pressed" from="Canvas/UI/DressUpCtrls/BottomsBckBtn" to="." method="_on_bottoms_bck_btn_pressed"] @@ -330,3 +347,4 @@ icon_name = "creative-commons-zero" [connection signal="pressed" from="Canvas/UI/SettingsCtrls/FullbodyBtn" to="." method="_on_fullbody_btn_pressed"] [connection signal="pressed" from="Canvas/UI/SettingsCtrls/SeparateBtn" to="." method="_on_separate_btn_pressed"] [connection signal="pressed" from="Canvas/UI/SettingsCtrls/SaveBtn" to="." method="_on_save_btn_pressed"] +[connection signal="toggled" from="Canvas/UI/FanBtn" to="." method="_on_fan_btn_toggled"] diff --git a/src/scenes/items.tres b/src/scenes/items.tres index 4304488..eb866e9 100644 --- a/src/scenes/items.tres +++ b/src/scenes/items.tres @@ -1,4 +1,4 @@ -[gd_resource type="SpriteFrames" load_steps=28 format=3 uid="uid://bhyon1s1op8ly"] +[gd_resource type="SpriteFrames" load_steps=26 format=3 uid="uid://bhyon1s1op8ly"] [ext_resource type="Texture2D" uid="uid://4f7dfxy24fey" path="res://src/sprites/clothes/sequences/bottoms/bottoms0001.png" id="1_i4r3c"] [ext_resource type="Texture2D" uid="uid://bs6nkpurxgr3p" path="res://src/sprites/clothes/sequences/bottoms/bottoms0002.png" id="2_pkmjm"] @@ -14,9 +14,7 @@ [ext_resource type="Texture2D" uid="uid://ccl0jntyuqb1l" path="res://src/sprites/clothes/sequences/outfits/outfits0003.png" id="12_rl56u"] [ext_resource type="Texture2D" uid="uid://1vp35m015ypl" path="res://src/sprites/clothes/sequences/outfits/outfits0004.png" id="13_hhvfk"] [ext_resource type="Texture2D" uid="uid://d3bhccyds3af6" path="res://src/sprites/clothes/sequences/outfits/outfits0005.png" id="14_tgnpk"] -[ext_resource type="Texture2D" uid="uid://duhwfr8wv184a" path="res://src/sprites/clothes/sequences/outfits/outfits0006.png" id="15_gcogo"] [ext_resource type="Texture2D" uid="uid://tqeyv6mvy6x0" path="res://src/sprites/clothes/sequences/outfits/outfits0007.png" id="16_fogca"] -[ext_resource type="Texture2D" uid="uid://22rtpk5uwfot" path="res://src/sprites/clothes/sequences/outfits/outfits0008.png" id="17_8r7xk"] [ext_resource type="Texture2D" uid="uid://3gxc6wknllcq" path="res://src/sprites/clothes/sequences/tops/tops0001.png" id="18_edhqb"] [ext_resource type="Texture2D" uid="uid://dhjg5vo1cs62m" path="res://src/sprites/clothes/sequences/tops/tops0002.png" id="19_57y8n"] [ext_resource type="Texture2D" uid="uid://b3f3sxfsteowe" path="res://src/sprites/clothes/sequences/tops/tops0003.png" id="20_s7eb7"] @@ -79,16 +77,10 @@ animations = [{ "texture": ExtResource("14_tgnpk") }, { "duration": 1.0, -"texture": ExtResource("15_gcogo") -}, { -"duration": 1.0, "texture": ExtResource("16_fogca") -}, { -"duration": 1.0, -"texture": ExtResource("17_8r7xk") }], "loop": true, -"name": &"fullbody", +"name": &"outfits", "speed": 5.0 }, { "frames": [{ diff --git a/src/scripts/game.gd b/src/scripts/game.gd index e6f83c6..54a9e2c 100644 --- a/src/scripts/game.gd +++ b/src/scripts/game.gd @@ -2,16 +2,15 @@ extends Node @onready var tops = $Character/Seperate/Tops @onready var bottoms = $Character/Seperate/Bottoms -@onready var seperate_items = $Seperate +@onready var seperate_items = $Character/Seperate @onready var bottoms_bck = $Canvas/UI/DressUpCtrls/BottomsBckBtn @onready var bottoms_fwd = $Canvas/UI/DressUpCtrls/BottomsFwdBtn @onready var outfits = $Character/Outfits @onready var fan = $World/Fan @onready var forward_click = $ForwardClick @onready var back_click = $BackClick - -# Only here for debugging purposes -@onready var outfits_btn = $Canvas/UI/SettingsCtrls/FullbodyBtn +@onready var fan_click = $FanClick +@onready var fan_asmr = $FanAsmr var is_seperate: bool = true var is_outfits: bool = false @@ -22,13 +21,7 @@ var config_file = Config.config_file() var save_file = Config.save_file() func _ready(): - - # Keep outfits button enabled in debug builds - if OS.is_debug_build(): - outfits_btn.disabled = false - - fan.play("default") - + # If config files don't exist, create them if !FileAccess.file_exists(config_file): Config.save_config(config_file) @@ -83,13 +76,13 @@ func _on_tops_fwd_btn_pressed(): next_frame(tops, tops.sprite_frames, "tops") if is_outfits: - next_frame(outfits, outfits.sprite_frames, "fullbody") + next_frame(outfits, outfits.sprite_frames, "outfits") func _on_tops_bck_btn_pressed(): next_frame(tops, tops.sprite_frames, "tops", true) if is_outfits: - next_frame(outfits, outfits.sprite_frames, "fullbody", true) + next_frame(outfits, outfits.sprite_frames, "outfits", true) func _on_bottoms_bck_btn_pressed(): next_frame(bottoms, bottoms.sprite_frames, "bottoms", true) @@ -98,7 +91,7 @@ func _on_bottoms_bck_btn_pressed(): func _on_bottoms_fwd_btn_pressed(): next_frame(bottoms, bottoms.sprite_frames, "bottoms") -func _on_fullbody_btn_pressed(): +func _on_outfits_btn_pressed(): is_seperate = false is_outfits = true seperate_items.hide() @@ -114,4 +107,12 @@ func _on_separate_btn_pressed(): bottoms_fwd.show() outfits.hide() - +func _on_fan_btn_toggled(toggled_on): + if toggled_on: + fan_click.play() + fan.play("default") + fan_asmr.play() + else: + fan_click.play() + fan.stop() + fan_asmr.stop() diff --git a/src/sounds/fan.ogg b/src/sounds/fan.ogg new file mode 100644 index 0000000..c89ed7c Binary files /dev/null and b/src/sounds/fan.ogg differ diff --git a/src/sounds/fan.ogg.import b/src/sounds/fan.ogg.import new file mode 100644 index 0000000..f787239 --- /dev/null +++ b/src/sounds/fan.ogg.import @@ -0,0 +1,19 @@ +[remap] + +importer="oggvorbisstr" +type="AudioStreamOggVorbis" +uid="uid://y4amvcp0iak4" +path="res://.godot/imported/fan.ogg-f549b5b02a1b888798d1483329397afb.oggvorbisstr" + +[deps] + +source_file="res://src/sounds/fan.ogg" +dest_files=["res://.godot/imported/fan.ogg-f549b5b02a1b888798d1483329397afb.oggvorbisstr"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/src/sprites/clothes/exit_symbol.svg b/src/sprites/clothes/exit_symbol.svg deleted file mode 100644 index 072c26d..0000000 --- a/src/sprites/clothes/exit_symbol.svg +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - image/svg+xml - - - - - - - - - - diff --git a/src/sprites/world/fan-button.png b/src/sprites/world/fan-button.png new file mode 100644 index 0000000..5188ad5 Binary files /dev/null and b/src/sprites/world/fan-button.png differ diff --git a/src/sprites/clothes/exit_symbol.svg.import b/src/sprites/world/fan-button.png.import similarity index 60% rename from src/sprites/clothes/exit_symbol.svg.import rename to src/sprites/world/fan-button.png.import index f1d35f3..2d21ac5 100644 --- a/src/sprites/clothes/exit_symbol.svg.import +++ b/src/sprites/world/fan-button.png.import @@ -2,16 +2,16 @@ importer="texture" type="CompressedTexture2D" -uid="uid://c2a13o0rcyned" -path="res://.godot/imported/exit_symbol.svg-ff081f8f5e81765d8a3e710ff997f080.ctex" +uid="uid://b5vt6y7uf4fi1" +path="res://.godot/imported/fan-button.png-3f6175299598b381713bc19b5a8fecd7.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://src/sprites/clothes/exit_symbol.svg" -dest_files=["res://.godot/imported/exit_symbol.svg-ff081f8f5e81765d8a3e710ff997f080.ctex"] +source_file="res://src/sprites/world/fan-button.png" +dest_files=["res://.godot/imported/fan-button.png-3f6175299598b381713bc19b5a8fecd7.ctex"] [params] @@ -32,6 +32,3 @@ process/hdr_as_srgb=false process/hdr_clamp_exposure=false process/size_limit=0 detect_3d/compress_to=1 -svg/scale=1.0 -editor/scale_with_editor_scale=false -editor/convert_colors_with_editor_theme=false