Add an offset in HorzCollisionBar and reset it at the beginning of every frame.

This commit is contained in:
King_DuckZ 2014-08-01 16:41:55 +02:00
parent cdd37fead7
commit 3522ce37a3
8 changed files with 67 additions and 10 deletions

View file

@ -45,4 +45,10 @@ namespace cloonel {
parPlaceable->OnRegister(*this, currTicket);
return currTicket;
}
///--------------------------------------------------------------------------
///--------------------------------------------------------------------------
void Mover::CopyPlaceables (std::unordered_set<Placeable*>& parOut) {
m_placeables.CopyObservers(parOut);
}
} //namespace cloonel

View file

@ -22,6 +22,7 @@
#include "vector.hpp"
#include "observersmanager.hpp"
#include <unordered_set>
namespace cloonel {
class Placeable;
@ -40,6 +41,7 @@ namespace cloonel {
virtual void Update ( float parDelta );
PlaceableTicketType RegisterPlaceable ( Placeable* parPlaceable, PlaceableTicketType parParent=ObserversManager<Placeable*>::Ticket_Null );
void UnregisterPlaceable ( PlaceableTicketType parID ) noexcept { m_placeables.Remove(parID); }
void CopyPlaceables ( std::unordered_set<Placeable*>& parOut );
protected:
std::size_t PlaceableCount ( void ) const { return m_placeables.size(); }