Add code to register objects to the collider.
The character and the platforms can register now, but collision is not triggered for some reason.
This commit is contained in:
parent
42fb50e93e
commit
cdd37fead7
13 changed files with 133 additions and 10 deletions
|
@ -20,11 +20,13 @@
|
|||
#ifndef id17908979556C47F8A978688BBE4A9D22
|
||||
|
||||
#include "placeable.hpp"
|
||||
#include "collidertypedef.hpp"
|
||||
#include <memory>
|
||||
|
||||
namespace cloonel {
|
||||
class SDLMain;
|
||||
class GameplayScene;
|
||||
class Collider;
|
||||
|
||||
class PlatformSystem : public Placeable {
|
||||
public:
|
||||
|
@ -36,6 +38,7 @@ namespace cloonel {
|
|||
PlatformSystem& operator= ( const PlatformSystem& ) = delete;
|
||||
|
||||
void Prepare ( void );
|
||||
void RegisterForCollision ( ColliderRegisterFunc parReg, ColliderUnregisterFunc parUnreg );
|
||||
void AddDrawables ( void );
|
||||
void Destroy ( void ) noexcept;
|
||||
void SpawnPlatforms ( void );
|
||||
|
@ -47,6 +50,8 @@ namespace cloonel {
|
|||
struct LocalData;
|
||||
|
||||
const std::unique_ptr<LocalData> m_localdata;
|
||||
ColliderRegisterFunc m_registerToCollider;
|
||||
ColliderUnregisterFunc m_unregisterFromCollider;
|
||||
};
|
||||
} //namespace cloonel
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue