- Modul dels arounders implementat, sense probar, cambie de comp i ho prove
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
#include "gamestates.h"
|
||||
#include "jgame.h"
|
||||
#include <SDL2/SDL.h>
|
||||
#include <string>
|
||||
#include "aux_font.h"
|
||||
#include "proc_mapa.h"
|
||||
#include <SDL2/SDL.h>
|
||||
#include "proc_arounders.h"
|
||||
|
||||
namespace gamestate
|
||||
{
|
||||
@@ -178,12 +179,11 @@ namespace gamestate
|
||||
// Si pulsem el botó de la dreta, el arounder seleccionat deixa de fer l'acció que està fent
|
||||
if (input::mouseClk(input::mouse::button::right))
|
||||
{
|
||||
// [TODO] arounders::abortarAccio();
|
||||
arounders::abortarAccio();
|
||||
}
|
||||
|
||||
if (input::mouseClk(input::mouse::button::left))
|
||||
{
|
||||
/* [TODO]
|
||||
if (!arounders::seleccionar())
|
||||
{
|
||||
if (input::mouseY()<165 && arounders::seleccionat != nullptr && arounders::seleccionat->accio == arounders::accions::caminar)
|
||||
@@ -200,7 +200,7 @@ namespace gamestate
|
||||
} else {
|
||||
arounders::seleccionat->prevista = botoPulsat;
|
||||
}
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
||||
currentTicks = game::getTicks() - startTicks;
|
||||
@@ -209,17 +209,16 @@ namespace gamestate
|
||||
aigua_frame1 = (aigua_frame1+1)%10;
|
||||
aigua_frame2 = (aigua_frame2+1)%10;
|
||||
|
||||
// [TODO] arounders::update();
|
||||
arounders::procesar();
|
||||
}
|
||||
|
||||
/* [TODO]
|
||||
if ( (game::getTicks() - arounderCount) >= mapa::velocitat*58) {
|
||||
if (mapa::arounders::eixits < mapa::arounders::totals) {
|
||||
arounders::afegir();
|
||||
mapa::arounders::eixits++;
|
||||
arounderCount = game::getTicks();
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
if (mapa::arounders::arrivats + mapa::arounders::morts == mapa::arounders::totals) {
|
||||
if (mapa::arounders::arrivats >= mapa::arounders::necessaris) {
|
||||
@@ -316,12 +315,11 @@ namespace gamestate
|
||||
|
||||
int accio = 0;
|
||||
int prevista = 0;
|
||||
// [TODO] if (arounders::seleccionat) { accio = arounders::seleccionat->accio; prevista = arounders::seleccionat->prevista; }
|
||||
// [QUESTION] Potser lo del seleccionat se deuria mirar dins de "mapa"?
|
||||
mapa::pintar(accio, prevista); // [TODO] if (arounders::seleccionat) existeix, pillar la accio i la prevista de ell
|
||||
if (arounders::seleccionat) { accio = arounders::seleccionat->accio; prevista = arounders::seleccionat->prevista; }
|
||||
mapa::pintar(accio, prevista);
|
||||
|
||||
draw_aigua();
|
||||
// [TODO] arounders::pintar();
|
||||
arounders::pintar();
|
||||
|
||||
// [TODO] de fet, pintar la marca en el modul "arounders"
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user