Add a line to the character to mark the collision bar.

This commit is contained in:
King_DuckZ 2014-08-22 11:03:32 +02:00
parent 5026ce2c53
commit 634503bf00
5 changed files with 28 additions and 2 deletions

View file

@ -39,6 +39,9 @@ namespace cloonel {
m_screenRatio(parMain),
m_bounceCallback(&DoNothing),
m_texture(new Texture(parPath, parMain, false))
#if defined(WITH_DEBUG_VISUALS)
, m_bottomBarDrawable(parMain, Colour(250, 5, 1), static_cast<ushort2>(m_bottomBar.From()), static_cast<ushort2>(m_bottomBar.To()))
#endif
{
assert(parMain);
m_bottomBar.SetCallback(std::bind(&Character::OnBounce, this, std::placeholders::_1, std::placeholders::_2));
@ -53,6 +56,9 @@ namespace cloonel {
m_screenRatio(parMain),
m_bounceCallback(&DoNothing),
m_texture(new Texture(parPath, parMain, false))
#if defined(WITH_DEBUG_VISUALS)
, m_bottomBarDrawable(parMain, Colour(250, 5, 1), static_cast<ushort2>(m_bottomBar.From()), static_cast<ushort2>(m_bottomBar.To()))
#endif
{
assert(parMain);
m_bottomBar.SetCallback(std::bind(&Character::OnBounce, this, std::placeholders::_1, std::placeholders::_2));
@ -88,6 +94,9 @@ namespace cloonel {
///-------------------------------------------------------------------------
void Character::Draw() const {
m_texture->Render(GetPos(), WidthHeight(), m_screenRatio.Ratio(), true);
#if defined(WITH_DEBUG_VISUALS)
m_bottomBarDrawable.Render(GetPos(), m_screenRatio.Ratio());
#endif
}
///-------------------------------------------------------------------------