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
f86bfd35
authored
Apr 10, 2025
by
Jaime de la Chica Bergillos
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Eventos de la puerta
parent
05b888ee
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
38 additions
and
12 deletions
Executable
Historia.cpp
PantallaPrincipal2.cpp
assets/AbreCaja_es.vtt
assets/ConseguirLlave_es.vtt
assets/LaPuertaEstaCerrada_es.vtt
Executable
View file @
f86bfd35
No preview for this file type
Historia.cpp
View file @
f86bfd35
...
@@ -43,6 +43,16 @@ static Objeto generarObjectoCartera(bool (*function)(Objeto *, Handle&)) {
...
@@ -43,6 +43,16 @@ static Objeto generarObjectoCartera(bool (*function)(Objeto *, Handle&)) {
return
Cartera
;
return
Cartera
;
}
}
static
Objeto
generarObjetoPuerta
()
{
auto
funcionPuerta
=
[](
Objeto
*
Puerta
,
Handle
&
handle
)
->
bool
{
play_video
(
"assets/LaPuertaEstaCerrada"
,
"es"
);
return
false
;
};
Sprite
sprPuerta
(
"assets/caminoInventado.png"
);
Hitbox
hitPuerta
(
1000000
,
-
10000000
,
350
,
0
);
Objeto
Puerta
(
sprPuerta
,
sprPuerta
,
sprPuerta
,
hitPuerta
,
0
,
0
,
0
,
0
,
normal
,
funcionPuerta
);
return
Puerta
;
}
static
void
iniciarInicio
()
{
static
void
iniciarInicio
()
{
play_video
(
"assets/Encerrado"
,
"es"
);
play_video
(
"assets/Encerrado"
,
"es"
);
...
@@ -57,14 +67,12 @@ static void iniciarInicio() {
...
@@ -57,14 +67,12 @@ static void iniciarInicio() {
Objeto
Calendario
=
generarObjetoCalendario
();
Objeto
Calendario
=
generarObjetoCalendario
();
Objeto
Cartera
=
generarObjectoCartera
(
nullptr
);
Objeto
Puerta
=
generarObjetoPuerta
(
);
getPantalla1
()
->
anadirObjeto
(
Pantalla
);
getPantalla1
()
->
anadirObjeto
(
Pantalla
);
getPantalla1
()
->
anadirObjeto
(
Calendario
);
getPantalla1
()
->
anadirObjeto
(
Calendario
);
getPantalla2
()
->
anadirObjeto
(
Puerta
);
Agapito
.
inventario
[
0
]
=
Cartera
;
Agapito
.
numObjetos
=
1
;
}
}
...
@@ -79,9 +87,12 @@ static void iniciarCalendarioVisto(){
...
@@ -79,9 +87,12 @@ static void iniciarCalendarioVisto(){
Objeto
Calendario
=
generarObjetoCalendario
();
Objeto
Calendario
=
generarObjetoCalendario
();
Objeto
Puerta
=
generarObjetoPuerta
();
getPantalla1
()
->
anadirObjeto
(
Pantalla
);
getPantalla1
()
->
anadirObjeto
(
Pantalla
);
getPantalla1
()
->
anadirObjeto
(
Calendario
);
getPantalla1
()
->
anadirObjeto
(
Calendario
);
getPantalla2
()
->
anadirObjeto
(
Puerta
);
auto
funcionComprobarPantallaMinimizada
=
[]
(
Handle
&
handle
)
->
bool
{
auto
funcionComprobarPantallaMinimizada
=
[]
(
Handle
&
handle
)
->
bool
{
if
(
handle
.
pantallaMinimizada
())
{
if
(
handle
.
pantallaMinimizada
())
{
...
@@ -106,9 +117,13 @@ static void iniciarCalendarioQuitado(){
...
@@ -106,9 +117,13 @@ static void iniciarCalendarioQuitado(){
Objeto
Pantalla
=
generarObjetoPantalla
(
funcionPantalla
);
Objeto
Pantalla
=
generarObjetoPantalla
(
funcionPantalla
);
Objeto
Puerta
=
generarObjetoPuerta
();
getPantalla1
()
->
anadirObjeto
(
Pantalla
);
getPantalla1
()
->
anadirObjeto
(
Pantalla
);
getPantalla2
()
->
anadirObjeto
(
Puerta
);
}
}
static
void
iniciarPuzlePantallaResuelto
(){
static
void
iniciarPuzlePantallaResuelto
(){
...
@@ -134,7 +149,9 @@ static void iniciarPuzlePantallaResuelto(){
...
@@ -134,7 +149,9 @@ static void iniciarPuzlePantallaResuelto(){
return
false
;
return
false
;
};
};
Objeto
caja
(
sprCaja
,
sprCaja
,
sprCaja
,
hitCaja
,
0
,
150
,
300
,
300
,
normal
,
funcionCaja
);
Objeto
caja
(
sprCaja
,
sprCaja
,
sprCaja
,
hitCaja
,
0
,
150
,
300
,
300
,
normal
,
funcionCaja
);
Objeto
Puerta
=
generarObjetoPuerta
();
getPantalla1
()
->
anadirObjeto
(
caja
);
getPantalla1
()
->
anadirObjeto
(
caja
);
getPantalla2
()
->
anadirObjeto
(
Puerta
);
}
}
...
...
PantallaPrincipal2.cpp
View file @
f86bfd35
#include "PantallaPrincipal2.h"
#include "PantallaPrincipal2.h"
#include "Hitbox.h"
PantallaPrincipal2
::
PantallaPrincipal2
()
:
PantallaPrincipal2
::
PantallaPrincipal2
()
:
...
@@ -6,7 +7,15 @@ PantallaPrincipal2::PantallaPrincipal2() :
...
@@ -6,7 +7,15 @@ PantallaPrincipal2::PantallaPrincipal2() :
"assets/fondoPuerta.jpg"
,
"assets/fondoPuerta.jpg"
,
Hitbox
(
1500
,
-
1500
,
2000
,
1300
),
Hitbox
(
1500
,
-
1500
,
2000
,
1300
),
0
,
0
,
{
3
00
,
1000
}
{
5
00
,
1000
}
)
)
{
{
Hitbox
hitFondo
(
1000000
,
-
10000000
,
300
,
0
);
//Hitbox hitCama(1000, 0, 1200,-10000000);
Hitbox
hitDer
(
1900
,
1300
,
10000000
,
-
10000000
);
Hitbox
hitIzq
(
350
,
0
,
10000000
,
-
10000000
);
colisionesActivas
.
push_back
(
hitFondo
);
colisionesActivas
.
push_back
(
hitIzq
);
colisionesActivas
.
push_back
(
hitDer
);
}
}
assets/AbreCaja_es.vtt
View file @
f86bfd35
...
@@ -10,7 +10,7 @@ Maldita sea
...
@@ -10,7 +10,7 @@ Maldita sea
3
3
00:00:06.250 --> 00:00:08.000
00:00:06.250 --> 00:00:08.000
Quiz
a
s en este libro venga la solución
Quiz
á
s en este libro venga la solución
4
4
00:00:12.750 --> 00:00:13.000
00:00:12.750 --> 00:00:13.000
...
@@ -18,7 +18,7 @@ Quizas en este libro venga la solución
...
@@ -18,7 +18,7 @@ Quizas en este libro venga la solución
5
5
00:00:13.000 --> 00:00:14.000
00:00:13.000 --> 00:00:14.000
Ya lo s
e
Ya lo s
é
6
6
00:00:16.000 --> 00:00:16.250
00:00:16.000 --> 00:00:16.250
...
@@ -34,7 +34,7 @@ Si hago así
...
@@ -34,7 +34,7 @@ Si hago así
9
9
00:00:20.500 --> 00:00:21.500
00:00:20.500 --> 00:00:21.500
Y hago así!
¡
Y hago así!
10
10
00:00:22.400 --> 00:00:23.000
00:00:22.400 --> 00:00:23.000
...
...
assets/ConseguirLlave_es.vtt
View file @
f86bfd35
...
@@ -6,7 +6,7 @@ WEBVTT
...
@@ -6,7 +6,7 @@ WEBVTT
2
2
00:00:01.600 --> 00:00:02.250
00:00:01.600 --> 00:00:02.250
*M
a
s esfuerzo imán*
*M
á
s esfuerzo imán*
3
3
00:00:02.500 --> 00:00:03.500
00:00:02.500 --> 00:00:03.500
...
@@ -26,7 +26,7 @@ El poder del magnetismo no está a mi favor
...
@@ -26,7 +26,7 @@ El poder del magnetismo no está a mi favor
7
7
00:00:12.750 --> 00:00:14.750
00:00:12.750 --> 00:00:14.750
Parece que al final s
i
que me ha funcionado
Parece que al final s
í
que me ha funcionado
8
8
00:00:14.750 --> 00:00:17.750
00:00:14.750 --> 00:00:17.750
...
...
assets/LaPuertaEstaCerrada_es.vtt
View file @
f86bfd35
...
@@ -6,4 +6,4 @@ Seguro que ha cerrado la puerta
...
@@ -6,4 +6,4 @@ Seguro que ha cerrado la puerta
2
2
00:00:04.000 --> 00:00:06.000
00:00:04.000 --> 00:00:06.000
no podr
e salir tan fa
cil
no podr
é salir tan fá
cil
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