Register the character's collision bar to the mover.
This fixes the non-working collision detection.
This commit is contained in:
parent
c12a6407d9
commit
c3baee5b9c
2 changed files with 9 additions and 0 deletions
|
@ -79,4 +79,10 @@ namespace cloonel {
|
|||
void Character::Draw() const {
|
||||
m_texture->Render(GetPos(), WidthHeight(), m_screenRatio.Ratio(), true);
|
||||
}
|
||||
|
||||
///-------------------------------------------------------------------------
|
||||
///-------------------------------------------------------------------------
|
||||
void Character::OnRegister (Mover& parMover, Mover::PlaceableTicketType parParentTicket) {
|
||||
parMover.RegisterPlaceable(&m_bottomBar, parParentTicket);
|
||||
}
|
||||
} //namespace cloonel
|
||||
|
|
|
@ -45,6 +45,9 @@ namespace cloonel {
|
|||
void RegisterForCollision ( ColliderRegisterFunc parRegisterCollision );
|
||||
|
||||
private:
|
||||
//Overrides
|
||||
virtual void OnRegister ( Mover& parMover, Mover::PlaceableTicketType parParentTicket );
|
||||
|
||||
HorzCollisionBar m_bottomBar;
|
||||
SizeNotifiable<regbehaviours::AutoRegister> m_screenRatio;
|
||||
const std::unique_ptr<Texture> m_texture;
|
||||
|
|
Loading…
Reference in a new issue