Mario: fix modifier deletion

This commit is contained in:
2021-08-07 12:13:23 +02:00
parent 7b1ef25f37
commit 6238022ed2
8 changed files with 88 additions and 77 deletions
+9 -9
View File
@@ -6,29 +6,29 @@
class BounceVisitor : public SDLPP::Visitor {
public:
BounceVisitor() {}
virtual void visit( const SDLPP::RenderObject &obj ) override;
virtual void setFromId( uint64_t id ) override {
BounceVisitor() = default;
void visit( const SDLPP::RenderObject &obj ) override;
void setFromId( uint64_t id ) override {
from = id;
}
virtual uint64_t getFromId() override {
uint64_t getFromId() const override {
return from;
}
virtual void setVisitorType( uint64_t type ) override {
void setVisitorType( uint64_t type ) override {
_type = type;
}
virtual uint64_t getVisitorType() override {
uint64_t getVisitorType() const override {
return _type;
}
bool canBounce() {
bool canBounce() const {
return hits < 2;
}
private:
int hits = 0;
uint64_t from;
uint64_t _type;
uint64_t from{};
uint64_t _type{};
};
#endif