diff --git a/game/assets/i18n/UltimateTossi18n.csv b/game/assets/i18n/UltimateTossi18n.csv index 6fcb6c6..25bfdb3 100644 --- a/game/assets/i18n/UltimateTossi18n.csv +++ b/game/assets/i18n/UltimateTossi18n.csv @@ -14,5 +14,5 @@ FOLLOW,follow,folge,segui,sigue MORE_GAMES,games,spiele,giochi,juegos NEXT,next,nächstes,prossimo,próximo HELP,skip level,level übers.,salta livello,saltar nivel -HELP_INSTRUCTIONS,1. Get a friend's yellow code\n2. Put into red text box\n\nCodes regenerate at midnight!,1. Besorg dir ein gelben Code eines Freundes\n2. Gib ihn ins rote Textfeld\n\nDie Codes werden um Mitternacht erneuert!,1. Ottieni un codice giallo di un amico\n2. Mettilo nella casella di testo rossa\n\nI codici si rigenerano a mezzanotte!,1. Consigue un código amarillo de un amigo\n2. Ponelo en la caja de texto roja\n\nLos códigos se regeneran a medianoche! +HELP_INSTRUCTIONS,1. Get a friend's yellow code\n2. Put into red text box\n\nCodes regenerate at midnight!,1. Besorg dir ein gelben Code eines Freundes\n2. Gib ihn ins rote Textfeld ein\n\nCodes werden um Mitternacht erneuert!,1. Ottieni un codice giallo di un amico\n2. Mettilo nella casella di testo rossa\n\nI codici si rigenerano a mezzanotte!,1. Consigue un código amarillo de un amigo\n2. Ponelo en la caja de texto roja\n\nLos códigos se regeneran a medianoche! PASTE,code,Kode,codice,codigo diff --git a/game/assets/i18n/UltimateTossi18n.de.translation b/game/assets/i18n/UltimateTossi18n.de.translation index 9c13b2e..e66de12 100644 Binary files a/game/assets/i18n/UltimateTossi18n.de.translation and b/game/assets/i18n/UltimateTossi18n.de.translation differ diff --git a/game/assets/i18n/UltimateTossi18n.en.translation b/game/assets/i18n/UltimateTossi18n.en.translation index 074c2ac..7d269c4 100644 Binary files a/game/assets/i18n/UltimateTossi18n.en.translation and b/game/assets/i18n/UltimateTossi18n.en.translation differ diff --git a/game/assets/i18n/UltimateTossi18n.es.translation b/game/assets/i18n/UltimateTossi18n.es.translation index 6a16c89..c7d6cc7 100644 Binary files a/game/assets/i18n/UltimateTossi18n.es.translation and b/game/assets/i18n/UltimateTossi18n.es.translation differ diff --git a/game/assets/i18n/UltimateTossi18n.it.translation b/game/assets/i18n/UltimateTossi18n.it.translation index 50f362f..e61496f 100644 Binary files a/game/assets/i18n/UltimateTossi18n.it.translation and b/game/assets/i18n/UltimateTossi18n.it.translation differ diff --git a/game/grabber-style.tres b/game/grabber-style.tres deleted file mode 100644 index 909ccf9..0000000 --- a/game/grabber-style.tres +++ /dev/null @@ -1,46 +0,0 @@ -[gd_resource type="Theme" load_steps=7 format=2] - -[ext_resource path="res://assets/font/manrope.thin.otf" type="DynamicFontData" id=1] -[ext_resource path="res://styles/button-normal.tres" type="StyleBox" id=2] - - - -[sub_resource type="StyleBoxFlat" id=1] -bg_color = Color( 0.988235, 0.898039, 0.152941, 1 ) - -[sub_resource type="StyleBoxFlat" id=2] -bg_color = Color( 1, 1, 1, 1 ) - -[sub_resource type="StyleBoxFlat" id=3] -bg_color = Color( 1, 1, 1, 1 ) - -[sub_resource type="DynamicFont" id=4] -size = 85 -outline_size = 6 -outline_color = Color( 0.196078, 0.196078, 0.196078, 1 ) -font_data = ExtResource( 1 ) - -[resource] -default_font = SubResource( 4 ) -Button/colors/font_color = Color( 1, 1, 1, 1 ) -Button/colors/font_color_disabled = Color( 0.9, 0.9, 0.9, 0.2 ) -Button/colors/font_color_hover = Color( 0.94, 0.94, 0.94, 1 ) -Button/colors/font_color_pressed = Color( 1, 1, 1, 1 ) -Button/constants/hseparation = 12 -Button/fonts/font = null -Button/icons/ = null -Button/styles/disabled = null -Button/styles/focus = ExtResource( 2 ) -Button/styles/hover = ExtResource( 2 ) -Button/styles/normal = ExtResource( 2 ) -Button/styles/pressed = null -VBoxContainer/constants/separation = 24 -VScrollBar/icons/decrement = null -VScrollBar/icons/decrement_highlight = null -VScrollBar/icons/increment = null -VScrollBar/icons/increment_highlight = null -VScrollBar/styles/grabber = SubResource( 1 ) -VScrollBar/styles/grabber_highlight = SubResource( 2 ) -VScrollBar/styles/grabber_pressed = SubResource( 3 ) -VScrollBar/styles/scroll = null -VScrollBar/styles/scroll_focus = null diff --git a/game/project.godot b/game/project.godot index 314890e..9e87280 100644 --- a/game/project.godot +++ b/game/project.godot @@ -22,7 +22,6 @@ _global_script_class_icons={ config/name="Ball2Box" run/main_scene="res://src/screens/splah/SplashScreen.tscn" -boot_splash/image="res://splash.png" boot_splash/bg_color=Color( 0.105882, 0.105882, 0.231373, 1 ) config/icon="res://icon.png" @@ -58,7 +57,7 @@ pointing/emulate_touch_from_mouse=true [locale] -test="es" +test="de" translations=PoolStringArray( "res://assets/i18n/UltimateTossi18n.de.translation", "res://assets/i18n/UltimateTossi18n.en.translation", "res://assets/i18n/UltimateTossi18n.es.translation", "res://assets/i18n/UltimateTossi18n.it.translation" ) [physics] diff --git a/game/splash.png b/game/splash.png deleted file mode 100644 index 82c5302..0000000 Binary files a/game/splash.png and /dev/null differ diff --git a/game/splash.png.import b/game/splash.png.import deleted file mode 100644 index fab3fd8..0000000 --- a/game/splash.png.import +++ /dev/null @@ -1,35 +0,0 @@ -[remap] - -importer="texture" -type="StreamTexture" -path="res://.import/splash.png-929ed8a00b89ba36c51789452f874c77.stex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://splash.png" -dest_files=[ "res://.import/splash.png-929ed8a00b89ba36c51789452f874c77.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 -process/normal_map_invert_y=false -stream=false -size_limit=0 -detect_3d=true -svg/scale=1.0 diff --git a/game/src/fade-effect/FadeEffect.gd b/game/src/fade-effect/FadeEffect.gd new file mode 100644 index 0000000..62df2fc --- /dev/null +++ b/game/src/fade-effect/FadeEffect.gd @@ -0,0 +1,43 @@ +# SPDX-FileCopyrightText: 2023 Simon Dalvai + +# SPDX-License-Identifier: AGPL-3.0-or-later + +extends Tween + +const DURATON:float = 0.2 + +export var node_path:NodePath +export var node_path2:NodePath + +var node:Node +var node2:Node + +func _ready() -> void: + if node_path: + node = get_node(node_path) + + if node_path2: + node2 = get_node(node_path2) + + if node: + node.modulate = Color(1, 1, 1, 0) + node.connect("visibility_changed", self, "fade_in") + if node2: + node2.modulate = Color(1, 1, 1, 0) + node2.connect("visibility_changed", self, "fade_in") + + + fade_in() + + +func fade_in() -> void: + if node: + interpolate_property(node, "modulate", + Color(1, 1, 1, 0), Color(1, 1, 1, 1), DURATON, + Tween.TRANS_LINEAR, Tween.EASE_IN) + start() + if node2: + interpolate_property(node2, "modulate", + Color(1, 1, 1, 0), Color(1, 1, 1, 1), DURATON, + Tween.TRANS_LINEAR, Tween.EASE_IN) + start() diff --git a/game/src/fade-effect/FadeEffect.tscn b/game/src/fade-effect/FadeEffect.tscn new file mode 100644 index 0000000..a197c1e --- /dev/null +++ b/game/src/fade-effect/FadeEffect.tscn @@ -0,0 +1,6 @@ +[gd_scene load_steps=2 format=2] + +[ext_resource path="res://src/fade-effect/FadeEffect.gd" type="Script" id=1] + +[node name="FadeEffect" type="Tween"] +script = ExtResource( 1 ) diff --git a/game/src/screens/help/Help.tscn b/game/src/screens/help/Help.tscn index 893948b..9e60c30 100644 --- a/game/src/screens/help/Help.tscn +++ b/game/src/screens/help/Help.tscn @@ -1,8 +1,9 @@ -[gd_scene load_steps=6 format=2] +[gd_scene load_steps=7 format=2] [ext_resource path="res://src/screens/help/Help.gd" type="Script" id=1] [ext_resource path="res://assets/paste.svg" type="Texture" id=2] [ext_resource path="res://assets/copy.svg" type="Texture" id=3] +[ext_resource path="res://src/fade-effect/FadeEffect.tscn" type="PackedScene" id=4] [sub_resource type="StyleBoxFlat" id=1] bg_color = Color( 0.960784, 0.94902, 0.301961, 1 ) @@ -16,6 +17,9 @@ anchor_right = 1.0 anchor_bottom = 1.0 script = ExtResource( 1 ) +[node name="FadeEffect" parent="." instance=ExtResource( 4 )] +node_path = NodePath("..") + [node name="VBoxContainer" type="VBoxContainer" parent="."] anchor_left = 0.5 anchor_top = 0.5 diff --git a/game/src/screens/info/Info.tscn b/game/src/screens/info/Info.tscn index 62b21fa..ab5f57d 100644 --- a/game/src/screens/info/Info.tscn +++ b/game/src/screens/info/Info.tscn @@ -1,6 +1,7 @@ -[gd_scene load_steps=4 format=2] +[gd_scene load_steps=5 format=2] [ext_resource path="res://theme.tres" type="Theme" id=1] +[ext_resource path="res://src/fade-effect/FadeEffect.tscn" type="PackedScene" id=2] [ext_resource path="res://src/screens/info/Info.gd" type="Script" id=3] [sub_resource type="StyleBoxFlat" id=1] @@ -21,6 +22,9 @@ __meta__ = { "_edit_use_anchors_": true } +[node name="FadeEffect" parent="." instance=ExtResource( 2 )] +node_path = NodePath("..") + [node name="VBoxContainer" type="VBoxContainer" parent="."] anchor_left = 0.5 anchor_top = 0.5 diff --git a/game/src/screens/level-complete/LevelComplete.tscn b/game/src/screens/level-complete/LevelComplete.tscn index 9c75f3d..c398deb 100644 --- a/game/src/screens/level-complete/LevelComplete.tscn +++ b/game/src/screens/level-complete/LevelComplete.tscn @@ -1,8 +1,9 @@ -[gd_scene load_steps=4 format=2] +[gd_scene load_steps=5 format=2] [ext_resource path="res://theme.tres" type="Theme" id=1] [ext_resource path="res://src/screens/level-complete/LevelComplete.gd" type="Script" id=2] [ext_resource path="res://assets/star.png" type="Texture" id=3] +[ext_resource path="res://src/fade-effect/FadeEffect.tscn" type="PackedScene" id=4] [node name="LevelComplete" type="Control"] pause_mode = 2 @@ -11,6 +12,9 @@ anchor_bottom = 1.0 theme = ExtResource( 1 ) script = ExtResource( 2 ) +[node name="FadeEffect" parent="." instance=ExtResource( 4 )] +node_path = NodePath("..") + [node name="VBoxContainer" type="VBoxContainer" parent="."] anchor_left = 0.5 anchor_top = 0.5 @@ -26,7 +30,6 @@ alignment = 1 margin_top = 65.0 margin_right = 475.0 margin_bottom = 183.0 -rect_scale = Vector2( 2, 2 ) rect_pivot_offset = Vector2( 237, 59 ) text = "12" align = 1 diff --git a/game/src/screens/level-select/LevelSelect.tscn b/game/src/screens/level-select/LevelSelect.tscn index eb0a0bb..0d8b694 100644 --- a/game/src/screens/level-select/LevelSelect.tscn +++ b/game/src/screens/level-select/LevelSelect.tscn @@ -1,6 +1,7 @@ -[gd_scene load_steps=3 format=2] +[gd_scene load_steps=4 format=2] [ext_resource path="res://theme.tres" type="Theme" id=1] +[ext_resource path="res://src/fade-effect/FadeEffect.tscn" type="PackedScene" id=2] [ext_resource path="res://src/screens/level-select/LevelSelect.gd" type="Script" id=4] [node name="LevelSelect" type="Control"] @@ -10,6 +11,9 @@ anchor_bottom = 1.0 theme = ExtResource( 1 ) script = ExtResource( 4 ) +[node name="FadeEffect" parent="." instance=ExtResource( 2 )] +node_path = NodePath("..") + [node name="VBoxContainer" type="VBoxContainer" parent="."] anchor_left = 0.5 anchor_top = 0.5 diff --git a/game/src/screens/main/Main.gd b/game/src/screens/main/Main.gd index a335b6f..829a0fd 100644 --- a/game/src/screens/main/Main.gd +++ b/game/src/screens/main/Main.gd @@ -9,8 +9,6 @@ signal levels signal info signal help -onready var animation_player:AnimationPlayer = $AnimationPlayer - func _ready() -> void: $Buttons/Settings/MusicButton.pressed = Global.music $Buttons/Settings/SfxButton.pressed = Global.sfx @@ -27,7 +25,6 @@ func _on_InfoButton_pressed() -> void: func _on_Info_back() -> void: AudioMachine.click() - animation_player.play("InfoFadeOut") func _on_SimonDalvai_pressed() -> void: @@ -55,6 +52,6 @@ func _on_Help_pressed() -> void: emit_signal("help") - func _on_LevelControl_levels() -> void: emit_signal("levels") + diff --git a/game/src/screens/main/Main.tscn b/game/src/screens/main/Main.tscn index 0e0b96a..eedfd43 100644 --- a/game/src/screens/main/Main.tscn +++ b/game/src/screens/main/Main.tscn @@ -1,49 +1,19 @@ -[gd_scene load_steps=16 format=2] +[gd_scene load_steps=15 format=2] [ext_resource path="res://assets/font/manrope.thin.otf" type="DynamicFontData" id=1] [ext_resource path="res://theme.tres" type="Theme" id=2] [ext_resource path="res://assets/musicOff.png" type="Texture" id=3] [ext_resource path="res://src/screens/main/Main.gd" type="Script" id=4] -[ext_resource path="res://panel.tres" type="StyleBox" id=5] +[ext_resource path="res://styles/panel.tres" type="StyleBox" id=5] [ext_resource path="res://assets/github.svg" type="Texture" id=6] [ext_resource path="res://src/ui/level-control/LevelControl.tscn" type="PackedScene" id=7] [ext_resource path="res://assets/musicOn.png" type="Texture" id=8] [ext_resource path="res://src/ui/toggle-button/ToggleButton.tscn" type="PackedScene" id=9] +[ext_resource path="res://src/fade-effect/FadeEffect.tscn" type="PackedScene" id=10] [ext_resource path="res://assets/audioOn.png" type="Texture" id=11] [ext_resource path="res://assets/audioOff.png" type="Texture" id=12] [ext_resource path="res://assets/information.png" type="Texture" id=13] -[sub_resource type="Animation" id=3] -resource_name = "FirstFadeIn" -length = 1.2 -tracks/0/type = "value" -tracks/0/path = NodePath("Fade:modulate") -tracks/0/interp = 1 -tracks/0/loop_wrap = true -tracks/0/imported = false -tracks/0/enabled = true -tracks/0/keys = { -"times": PoolRealArray( 0, 0.4, 0.7, 1.2 ), -"transitions": PoolRealArray( 1, 1, 1, 1 ), -"update": 0, -"values": [ Color( 1, 1, 1, 1 ), Color( 1, 1, 1, 1 ), Color( 1, 1, 1, 0 ), Color( 1, 1, 1, 0 ) ] -} - -[sub_resource type="Animation" id=12] -length = 0.001 -tracks/0/type = "value" -tracks/0/path = NodePath("Fade:modulate") -tracks/0/interp = 1 -tracks/0/loop_wrap = true -tracks/0/imported = false -tracks/0/enabled = true -tracks/0/keys = { -"times": PoolRealArray( 0 ), -"transitions": PoolRealArray( 1 ), -"update": 0, -"values": [ Color( 1, 1, 1, 0 ) ] -} - [sub_resource type="DynamicFont" id=13] size = 53 outline_size = 3 @@ -60,20 +30,6 @@ rect_pivot_offset = Vector2( 360, 640 ) theme = ExtResource( 2 ) script = ExtResource( 4 ) -[node name="AnimationPlayer" type="AnimationPlayer" parent="."] -anims/FirstFadeIn = SubResource( 3 ) -anims/RESET = SubResource( 12 ) - -[node name="Fade" type="ColorRect" parent="."] -modulate = Color( 1, 1, 1, 0 ) -anchor_right = 1.0 -anchor_bottom = 1.0 -margin_left = 11.0 -margin_top = 19.0 -margin_right = 11.0 -margin_bottom = 19.0 -color = Color( 0.105882, 0.105882, 0.231373, 1 ) - [node name="Buttons" type="VBoxContainer" parent="."] anchor_left = 0.5 anchor_top = 0.5 @@ -204,6 +160,9 @@ size_flags_horizontal = 4 custom_fonts/font = SubResource( 13 ) text = "simondalvai.org" +[node name="FadeEffect" parent="." instance=ExtResource( 10 )] +node_path = NodePath("..") + [connection signal="levels" from="Buttons/LevelControl" to="." method="_on_LevelControl_levels"] [connection signal="pressed" from="Buttons/Play" to="." method="_on_Play_pressed"] [connection signal="pressed" from="Buttons/Help" to="." method="_on_Help_pressed"] diff --git a/game/src/screens/shop/Shop.tscn b/game/src/screens/shop/Shop.tscn index ffb5107..deea201 100644 --- a/game/src/screens/shop/Shop.tscn +++ b/game/src/screens/shop/Shop.tscn @@ -1,7 +1,8 @@ -[gd_scene load_steps=4 format=2] +[gd_scene load_steps=5 format=2] [ext_resource path="res://theme.tres" type="Theme" id=1] [ext_resource path="res://src/screens/shop/Shop.gd" type="Script" id=2] +[ext_resource path="res://src/fade-effect/FadeEffect.tscn" type="PackedScene" id=3] [ext_resource path="res://assets/star.png" type="Texture" id=5] [node name="Shop" type="Control"] @@ -15,6 +16,9 @@ __meta__ = { "_edit_use_anchors_": true } +[node name="FadeEffect" parent="." instance=ExtResource( 3 )] +node_path = NodePath("..") + [node name="VBoxContainer" type="VBoxContainer" parent="."] anchor_left = 0.5 anchor_top = 0.568 diff --git a/game/button-transparent.tres b/game/styles/button-transparent.tres similarity index 100% rename from game/button-transparent.tres rename to game/styles/button-transparent.tres diff --git a/game/panel.tres b/game/styles/panel.tres similarity index 100% rename from game/panel.tres rename to game/styles/panel.tres diff --git a/game/theme.tres b/game/theme.tres index 0141092..625f61c 100644 --- a/game/theme.tres +++ b/game/theme.tres @@ -4,8 +4,8 @@ [ext_resource path="res://styles/button-pressed.tres" type="StyleBox" id=2] [ext_resource path="res://assets/font/manrope.thin.otf" type="DynamicFontData" id=3] [ext_resource path="res://styles/button-disabled.tres" type="StyleBox" id=4] -[ext_resource path="res://button-transparent.tres" type="StyleBox" id=5] -[ext_resource path="res://panel.tres" type="StyleBox" id=6] +[ext_resource path="res://styles/button-transparent.tres" type="StyleBox" id=5] +[ext_resource path="res://styles/panel.tres" type="StyleBox" id=6] [sub_resource type="DynamicFont" id=9] size = 85