tidy-fix automàtic (sense naming)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#include "game/engendro.hpp"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <cstdlib>
|
||||
|
||||
#include "core/jail/jgame.hpp"
|
||||
|
||||
@@ -29,16 +29,20 @@ Engendro::Engendro(JD8_Surface gfx, Uint16 x, Uint16 y)
|
||||
this->cycles_per_frame = 30;
|
||||
}
|
||||
|
||||
bool Engendro::update() {
|
||||
auto Engendro::update() -> bool {
|
||||
bool mort = false;
|
||||
|
||||
if (JG_GetCycleCounter() % this->cycles_per_frame == 0) {
|
||||
this->cur_frame++;
|
||||
if (this->cur_frame == entitat.animacions[this->o].frames.size()) this->cur_frame = 0;
|
||||
if (this->cur_frame == entitat.animacions[this->o].frames.size()) {
|
||||
this->cur_frame = 0;
|
||||
}
|
||||
this->vida--;
|
||||
}
|
||||
|
||||
if (vida == 0) mort = true;
|
||||
if (vida == 0) {
|
||||
mort = true;
|
||||
}
|
||||
|
||||
return mort;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user