Mario: detect left/right collision
This commit is contained in:
@@ -23,6 +23,12 @@ public:
|
||||
virtual void fromId( uint64_t id ) override {
|
||||
from = id;
|
||||
}
|
||||
bool canGoLeft() {
|
||||
return !left;
|
||||
}
|
||||
bool canGoRight() {
|
||||
return !right;
|
||||
}
|
||||
|
||||
private:
|
||||
bool onGround = false;
|
||||
@@ -30,6 +36,8 @@ private:
|
||||
bool stop = false;
|
||||
double newX;
|
||||
uint64_t from = -1;
|
||||
bool left = false;
|
||||
bool right = false;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user