Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

163 salvar progresso #175

Merged
merged 19 commits into from
Oct 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions projeto/dialogic/themes/theme-1723052560.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,25 @@ use_image=true
full_width=true
use_color=false
color="#00000000"
image="res://elementos/imagem/enchente/cutscene/caixa_dialogo.png"
image="res://elementos/imagem/enchente/cutscene/no.png"

[text]

color="#ff000000"
text_margin_left=20.0
text_margin_right=20.0
text_margin_top=28.0

[name]

is_hidden=true

[next_indicator]

image="res://elementos/UI/minigame_senhorinha/Vitoria_derrota/voltar_feed/Normal.png"
scale=0.5
image="res://elementos/imagem/enchente/cutscene/seta_def.png"
scale=1.0
offset=Vector2( 10, 10 )
animation="Up and down"

[offset]

Expand All @@ -38,7 +40,7 @@ box_margin_left=40.0
box_margin_right=-40.0
box_margin_top=40.0
box_margin_bottom=-100.0
size=Vector2( 600, 167 )
size=Vector2( 600, 180 )
anchor=8

[animation]
Expand All @@ -50,6 +52,8 @@ dim_time=0.0
[ninepatch]

ninepatch_margin_bottom=0.0
ninepatch_margin_left=0.0
ninepatch_margin_top=0.0

[buttons]

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added projeto/elementos/UI/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
93 changes: 93 additions & 0 deletions projeto/elementos/fontes/Courier_Prime/OFL.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
Copyright 2015 The Courier Prime Project Authors (https://github.com/quoteunquoteapps/CourierPrime).

This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
https://openfontlicense.org


-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------

PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.

The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.

DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.

"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).

"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).

"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.

"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.

PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:

1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.

2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.

3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.

4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.

5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.

TERMINATION
This license becomes null and void if any of the above conditions are
not met.

DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
Binary file added projeto/elementos/fontes/LondrinaSolid-Black.ttf
Binary file not shown.
Binary file added projeto/elementos/fontes/LondrinaSolid-Light.ttf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added projeto/elementos/imagem/baloes/netinha.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added projeto/elementos/imagem/baloes/ufa.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added projeto/elementos/imagem/baloes/vuush.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added projeto/elementos/imagem/enchente/cutscene/no.png
6 changes: 4 additions & 2 deletions projeto/recursos/Menu_principal/Menu_Principal.tscn
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[gd_scene load_steps=25 format=2]
[gd_scene load_steps=26 format=2]

[ext_resource path="res://elementos/UI/minigame_senhorinha/MenuPrincipal/Clouds_BG.png" type="Texture" id=1]
[ext_resource path="res://elementos/UI/minigame_senhorinha/MenuPrincipal/btn_jogar_normal.png" type="Texture" id=2]
Expand All @@ -21,6 +21,7 @@
[ext_resource path="res://elementos/UI/minigame_senhorinha/bandeira/Timeline 1_0006.png" type="Texture" id=19]
[ext_resource path="res://elementos/UI/minigame_senhorinha/bandeira/Timeline 1_0008.png" type="Texture" id=20]
[ext_resource path="res://elementos/UI/minigame_senhorinha/MenuPrincipal/Sky_BG.png" type="Texture" id=21]
[ext_resource path="res://recursos/jogos/enchente/abertura/CutsceneBase.tscn" type="PackedScene" id=22]

[sub_resource type="Shader" id=1]
code = "shader_type canvas_item;
Expand Down Expand Up @@ -58,7 +59,8 @@ rect_pivot_offset = Vector2( -1026, 372 )
size_flags_horizontal = 3
size_flags_vertical = 3
script = ExtResource( 8 )
proxima_cena = ExtResource( 9 )
proxima_cena = ExtResource( 22 )
cena_jogo = ExtResource( 9 )

[node name="AudioStreamBGM" type="AudioStreamPlayer" parent="."]
stream = ExtResource( 5 )
Expand Down
12 changes: 12 additions & 0 deletions projeto/recursos/Menu_principal/SingletonOpcoesGlobais.gd
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ var ativarBotoes: bool
#var ativarSpeedrun = false
#var tempoRecord = []
var dificuldadeAtual = "facil"
var pularCutScene : bool = false
var pularTutorial : bool = false

signal Atualizou

Expand All @@ -18,6 +20,8 @@ func salvar_globais():
Salvamento.salvar("globais", "volumeSFX", volumeSFX)
Salvamento.salvar("globais", "ativarBotoes", ativarBotoes)
Salvamento.salvar("globais", "dificuldadeAtual", dificuldadeAtual)
Salvamento.salvar("globais", "pularCutScene", pularCutScene)
Salvamento.salvar("globais", "pularTutorial", pularTutorial)
emit_signal("Atualizou")

func carregar_globais():
Expand All @@ -26,5 +30,13 @@ func carregar_globais():
volumeSFX = int(Salvamento.carregar("globais", "volumeSFX"))
ativarBotoes = bool(Salvamento.carregar("globais", "ativarBotoes"))
dificuldadeAtual = str(Salvamento.carregar("globais", "dificuldadeAtual"))
if Salvamento.carregar("globais", "pularCutScene"):
pularCutScene = bool(Salvamento.carregar("globais", "pularCutScene"))
else:
pularCutScene = false
if Salvamento.carregar("globais", "pularTutorial"):
pularTutorial = bool(Salvamento.carregar("globais", "pularTutorial"))
else:
pularTutorial = false
else:
salvar_globais()
9 changes: 8 additions & 1 deletion projeto/recursos/Menu_principal/menu_opcoes/Menu.gd
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ onready var tween_jogar = $Buttons/Btn_Jogar/tween_jogar
onready var tween_opcoes = $Buttons/Btn_Opcoes/tween_opcoes

export(PackedScene) var proxima_cena: PackedScene
export(PackedScene) var cena_jogo: PackedScene

var _volume_atual: float = 999
var opcoes_apertado: bool = false
Expand All @@ -15,6 +16,9 @@ func _ready():
SingletonOpcoesGlobais.connect("Atualizou", self, "_atualizar_volume")
_atualizar_volume()

func _process(delta: float) -> void:
$Background/Bandeira.position.x = get_global_rect().get_center().x

func _atualizar_volume():
if SingletonOpcoesGlobais.volumeSom != _volume_atual:
_volume_atual = SingletonOpcoesGlobais.volumeSom
Expand Down Expand Up @@ -45,6 +49,9 @@ func _on_Jogar_button_up():
$Buttons/Btn_Jogar.disabled = true
yield(tween_jogar, "tween_completed")
if jogar_apertado and opcoes_apertado == false:
TrocadorDeCenas.trocar_cena(proxima_cena.resource_path)
if not SingletonOpcoesGlobais.pularCutScene:
TrocadorDeCenas.trocar_cena(proxima_cena.resource_path)
else:
TrocadorDeCenas.trocar_cena(cena_jogo.resource_path)
$Buttons/Btn_Jogar.disabled = false
jogar_apertado = false
46 changes: 41 additions & 5 deletions projeto/recursos/Menu_principal/menu_opcoes/MenuDeOpcoes.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,17 @@ __meta__ = {
[node name="VoltarMenu" type="TextureButton" parent="MenuDeOpcoes/Menu"]
anchor_left = 0.303846
anchor_top = 0.818386
anchor_right = 0.694231
anchor_right = 0.786538
anchor_bottom = 0.93722
margin_left = -16.0
margin_top = 1.0
margin_right = -16.0
margin_bottom = 1.0
toggle_mode = true
texture_normal = ExtResource( 1 )
texture_pressed = ExtResource( 2 )
texture_hover = ExtResource( 3 )
expand = true
__meta__ = {
"_edit_use_anchors_": true
}

[node name="Label" type="Label" parent="MenuDeOpcoes/Menu/VoltarMenu"]
anchor_left = 0.5
Expand All @@ -99,8 +100,12 @@ valign = 1
[node name="VoltarJogo" type="TextureButton" parent="MenuDeOpcoes/Menu"]
anchor_left = 0.303846
anchor_top = 0.70852
anchor_right = 0.694231
anchor_right = 0.784615
anchor_bottom = 0.827354
margin_left = -16.0
margin_top = 1.0
margin_right = -16.0
margin_bottom = 1.0
toggle_mode = true
texture_normal = ExtResource( 1 )
texture_pressed = ExtResource( 2 )
Expand All @@ -125,6 +130,36 @@ text = "voltar ao jogo"
align = 1
valign = 1

[node name="ReiniciarCutscene" type="TextureButton" parent="MenuDeOpcoes/Menu"]
anchor_left = 0.303846
anchor_top = 0.598655
anchor_right = 0.786538
anchor_bottom = 0.717489
margin_left = -16.0
margin_top = 0.999969
margin_right = -16.0
margin_bottom = 0.999969
toggle_mode = true
texture_normal = ExtResource( 1 )
texture_pressed = ExtResource( 2 )
texture_hover = ExtResource( 3 )
expand = true

[node name="Label" type="Label" parent="MenuDeOpcoes/Menu/ReiniciarCutscene"]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -96.5001
margin_top = -19.5001
margin_right = 93.4999
margin_bottom = 14.4999
custom_colors/font_color = Color( 0, 0, 0, 1 )
custom_fonts/font = SubResource( 2 )
text = "Reiniciar abertura"
align = 1
valign = 1

[node name="Titulo" type="Label" parent="MenuDeOpcoes/Menu"]
anchor_left = 0.0442308
anchor_top = 0.154709
Expand Down Expand Up @@ -181,3 +216,4 @@ __meta__ = {

[connection signal="button_up" from="MenuDeOpcoes/Menu/VoltarMenu" to="." method="_on_VoltarMenu_button_up"]
[connection signal="button_up" from="MenuDeOpcoes/Menu/VoltarJogo" to="." method="_on_VoltarJogo_button_up"]
[connection signal="button_up" from="MenuDeOpcoes/Menu/ReiniciarCutscene" to="." method="_on_ReiniciarCutscene_button_up"]
10 changes: 9 additions & 1 deletion projeto/recursos/Menu_principal/menu_opcoes/MenuOpcoes.gd
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ onready var voltarmenu: TextureButton = $MenuDeOpcoes/Menu/VoltarMenu
onready var voltarjogo: TextureButton = $MenuDeOpcoes/Menu/VoltarJogo

export var menupath: String = 'res://recursos/Menu_principal/Menu_Principal.tscn'
onready var reiniciar_cutscene = $MenuDeOpcoes/Menu/ReiniciarCutscene

func _ready():
print(SingletonGlobal.ativarBotoes)
Expand All @@ -22,10 +23,11 @@ func _ready():
porcentagemEfeitosWheel.text = str(efeitosWheel.value) + '%'

if get_tree().get_current_scene().get_name() == "Enchente":
reiniciar_cutscene.visible = false
#print(get_tree().get_current_scene().get_name())
pass
else:
voltarmenu.visible = false
reiniciar_cutscene.visible = SingletonOpcoesGlobais.pularCutScene or SingletonOpcoesGlobais.pularTutorial
$MenuDeOpcoes/Menu/VoltarJogo/Label.text = "voltar ao menu"
#print(get_tree().get_current_scene().get_name())

Expand All @@ -50,3 +52,9 @@ func _on_VoltarMenu_button_up():
func _process(delta):
porcentagemMusicaWheel.text = str(musicaWheel.value) + '%'
porcentagemEfeitosWheel.text = str(efeitosWheel.value) + '%'


func _on_ReiniciarCutscene_button_up():
SingletonOpcoesGlobais.pularCutScene = false
SingletonOpcoesGlobais.pularTutorial = false
SingletonOpcoesGlobais.salvar_globais()
Loading