Skip to content

Commit

Permalink
Merge branch 'master' of github.com:Gaspard--/Ultra-Ninja-VS-Falling-…
Browse files Browse the repository at this point in the history
…Zombies-II
  • Loading branch information
Zeng-Zer committed Dec 5, 2017
2 parents 2886be2 + 64ccc91 commit 8a4d623
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/EntityManager.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class EntityManager

private:
// for spawn zombie
static constexpr const int MaxEntities = 600;
static constexpr const int MaxEntities = 450;
int rateOfSpawn;
int frame;
};
1 change: 1 addition & 0 deletions include/TextureHandler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ public :
ZOMBIEHEAD,
HUMANHEAD,
SAVE_ME,
HIGH_FIVE
};

static void initTextureHandler();
Expand Down
Binary file added resources/HighFive.bmp
Binary file not shown.
10 changes: 9 additions & 1 deletion source/Display.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,15 @@ void Display::copyRenderData(Logic const &logic)
camera.zoom * static_cast<float>(human.entity.fixture.radius * 2.0) * Vect<2u, float>{1.0f, 1.5f},
(pos[1] + 1.1f) * 0.4f
});
if (human.isRunningAway())
if (human.isJumping)
displayInfo.renderables[TextureHandler::getInstance().getTexture(TextureHandler::TextureList::HIGH_FIVE)].push_back(Renderable{
{0.0f, 0.0f},
{1.0f, 1.0f},
Vect<2, double>(pos[0], pos[1] + human.getOffset() + 0.1),
camera.zoom * Vect<2u, float>(0.3f, 0.15f),
(pos[1] + 1.1f) * 0.4f
});
else if (human.isRunningAway())
displayInfo.renderables[TextureHandler::getInstance().getTexture(TextureHandler::TextureList::SAVE_ME)].push_back(Renderable{
{0.0f, 0.0f},
{1.0f, 1.0f},
Expand Down
1 change: 1 addition & 0 deletions source/TextureHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ void TextureHandler::initTextureHandler()
_instance->addTexture(TextureList::ZOMBIEHEAD, "resources/ZombieHead.bmp");
_instance->addTexture(TextureList::HUMANHEAD, "resources/CitizenHead.bmp");
_instance->addTexture(TextureList::SAVE_ME, "resources/SaveMe.bmp");
_instance->addTexture(TextureList::HIGH_FIVE, "resources/HighFive.bmp");
}

TextureHandler& TextureHandler::getInstance()
Expand Down

0 comments on commit 8a4d623

Please sign in to comment.