Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
José Pardo Madera
/
ProjectoMultimeda2025
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
028952ab
authored
Apr 03, 2025
by
José Pardo Madera
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Se muestra el calendario antes de desaparecer
parent
387fd592
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
6 deletions
Executable
Historia.cpp
Executable
View file @
028952ab
No preview for this file type
Historia.cpp
View file @
028952ab
...
...
@@ -16,34 +16,58 @@ void Historia::limpiarEstado(){
}
};
static
void
iniciarInicio
()
{
static
Objeto
generarObjetoPantalla
(
bool
(
*
funcion
)(
Objeto
*
))
{
Sprite
sprPantalla
(
"assets/pantalla.png"
);
Hitbox
hitPantalla
(
300
,
200
,
500
,
-
1000000000
);
Objeto
Pantalla
(
sprPantalla
,
sprPantalla
,
sprPantalla
,
hitPantalla
,
0
,
150
,
300
,
300
,
normal
,
funcion
);
return
Pantalla
;
}
static
Objeto
generarObjetoCalendario
()
{
Sprite
sprCalendario
(
"assets/calendario.png"
);
Hitbox
hitCalendario
(
-
100000
,
-
200000
,
-
10000
,
-
1000000000
);
// (Hitbox inacesible)
Objeto
Calendario
(
sprCalendario
,
sprCalendario
,
sprCalendario
,
hitCalendario
,
400
,
150
,
150
,
250
,
normal
,
nullptr
);
return
Calendario
;
}
static
void
iniciarInicio
()
{
auto
funcionPantalla
=
[](
Objeto
*
Pantalla
)
->
bool
{
play_video
(
"assets/MiedoCalendario1"
,
"es"
);
historiaPrincipal
.
pasarDeEstadoA
(
Historia
::
Secuencia
::
Inicio
,
Historia
::
Secuencia
::
CalendarioVisto
);
return
false
;
};
Objeto
Pantalla
(
sprPantalla
,
sprPantalla
,
sprPantalla
,
hitPantalla
,
0
,
100
,
400
,
400
,
normal
,
funcionPantalla
);
Objeto
Pantalla
=
generarObjetoPantalla
(
funcionPantalla
);
Objeto
Calendario
=
generarObjetoCalendario
();
getPantalla1
()
->
anadirObjeto
(
Pantalla
);
getPantalla1
()
->
anadirObjeto
(
Calendario
);
}
static
void
iniciarCalendarioVisto
(){
Sprite
sprPantalla
(
"assets/pantalla.png"
);
Hitbox
hitPantalla
(
300
,
200
,
500
,
-
1000000
);
auto
funcionPantalla
=
[](
Objeto
*
Pantalla
)
->
bool
{
play_video
(
"assets/MiedoCalendario2"
,
"es"
);
return
false
;
};
Objeto
Pantalla
(
sprPantalla
,
sprPantalla
,
sprPantalla
,
hitPantalla
,
0
,
100
,
400
,
400
,
normal
,
funcionPantalla
);
Objeto
Pantalla
=
generarObjetoPantalla
(
funcionPantalla
);
Objeto
Calendario
=
generarObjetoCalendario
();
getPantalla1
()
->
anadirObjeto
(
Pantalla
);
getPantalla1
()
->
anadirObjeto
(
Calendario
);
auto
funcionComprobarPantallaMinimizada
=
[]
(
Handle
&
handle
)
->
bool
{
std
::
cout
<<
"Calling hook"
<<
std
::
endl
;
...
...
@@ -60,6 +84,22 @@ static void iniciarCalendarioVisto(){
}
static
void
iniciarCalendarioQuitado
(){
auto
funcionPantalla
=
[](
Objeto
*
Pantalla
)
->
bool
{
// TODO
return
false
;
};
Objeto
Pantalla
=
generarObjetoPantalla
(
funcionPantalla
);
getPantalla1
()
->
anadirObjeto
(
Pantalla
);
}
void
Historia
::
siguienteEstado
(
Secuencia
estado
){
switch
(
estado
){
case
Inicio
:
...
...
@@ -71,6 +111,7 @@ void Historia::siguienteEstado(Secuencia estado){
break
;
case
CalendarioQuitado
:
iniciarCalendarioQuitado
();
break
;
case
PuzlePantallaResuelto
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment