Add a line to the character to mark the collision bar.
This commit is contained in:
parent
5026ce2c53
commit
634503bf00
5 changed files with 28 additions and 2 deletions
|
@ -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
|
||||
}
|
||||
|
||||
///-------------------------------------------------------------------------
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue