Add some collision bars.
This commit is contained in:
parent
cdaffe0f2b
commit
f52476a4ec
4 changed files with 18 additions and 1 deletions
|
@ -26,6 +26,7 @@ namespace cloonel {
|
|||
///--------------------------------------------------------------------------
|
||||
Platform::Platform (SDLMain* parSdlMain, const float2& parPos, Texture* parTexture, const float2& parSize) :
|
||||
Placeable(parPos),
|
||||
m_collisionTop(parPos, parSize.x()),
|
||||
m_screenRatio(parSdlMain),
|
||||
m_size(parSize),
|
||||
m_surface(parTexture)
|
||||
|
@ -37,6 +38,7 @@ namespace cloonel {
|
|||
///--------------------------------------------------------------------------
|
||||
Platform::Platform (Platform&& parOther) noexcept :
|
||||
Placeable(parOther.GetPos()),
|
||||
m_collisionTop(parOther.m_collisionTop),
|
||||
m_screenRatio(std::move(parOther.m_screenRatio)),
|
||||
m_size(parOther.m_size),
|
||||
m_surface(parOther.m_surface)
|
||||
|
@ -59,4 +61,10 @@ namespace cloonel {
|
|||
m_surface = parOther.m_surface;
|
||||
return *this;
|
||||
}
|
||||
|
||||
///--------------------------------------------------------------------------
|
||||
///--------------------------------------------------------------------------
|
||||
void Platform::OnRegister (Mover& parMover, Mover::PlaceableTicketType parParentTicket) {
|
||||
parMover.RegisterPlaceable(&m_collisionTop, parParentTicket);
|
||||
}
|
||||
} //namespace cloonel
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue