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,6 +20,7 @@
|
|||
#include "character.hpp"
|
||||
#include "sdlmain.hpp"
|
||||
#include "texture.hpp"
|
||||
#include "collider.hpp"
|
||||
#include <cassert>
|
||||
|
||||
namespace cloonel {
|
||||
|
@ -52,6 +53,12 @@ namespace cloonel {
|
|||
Character::~Character() noexcept {
|
||||
}
|
||||
|
||||
///-------------------------------------------------------------------------
|
||||
///-------------------------------------------------------------------------
|
||||
void Character::RegisterForCollision (ColliderRegisterFunc parRegisterCollision) {
|
||||
parRegisterCollision(&m_bottomBar);
|
||||
}
|
||||
|
||||
///-------------------------------------------------------------------------
|
||||
///-------------------------------------------------------------------------
|
||||
void Character::Prepare() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue