I give up, I'm just using the stop-dead system for now.

This commit is contained in:
Kayne Ruse
2014-12-27 23:16:48 +11:00
parent b67e85e87b
commit 8708cfbee0
3 changed files with 34 additions and 3 deletions
+12
View File
@@ -21,3 +21,15 @@
*/
#include "local_character.hpp"
#include <iostream>
bool LocalCharacter::ProcessCollisionGrid(std::list<BoundingBox> boxList) {
for(auto& box : boxList) {
if (box.CheckOverlap(origin + bounds)) {
origin -= motion;
motion = {0, 0};
return true;
}
}
return false;
}
+6
View File
@@ -23,12 +23,18 @@
#define LOCALCHARACTER_HPP_
#include "base_character.hpp"
#include "bounding_box.hpp"
#include "vector2.hpp"
#include <list>
class LocalCharacter: public BaseCharacter {
public:
LocalCharacter() = default;
virtual ~LocalCharacter() = default;
bool ProcessCollisionGrid(std::list<BoundingBox>);
private:
//NOTE: NO MEMBERS
};