Rules are not template anymore (it was dumb)
Entities are now managed with unique_ptr to allow polymorphism (and good memory management) Rules can be added via the Level object Fixed Rule::findTarget not caring about targetType TODO : Find why pathfinding (unlikely) or findTarget (most likely) is broken
This commit is contained in:
parent
4ab83f1124
commit
c94fc5a0be
7 changed files with 221 additions and 193 deletions
|
@ -51,6 +51,7 @@ public:
|
|||
virtual void update();
|
||||
|
||||
virtual State getState() const;
|
||||
virtual EntityType getType() const;
|
||||
virtual pro_maat::GridPos getTarget() const;
|
||||
|
||||
virtual const sf::RectangleShape& getShape() const;
|
||||
|
@ -84,7 +85,6 @@ private:
|
|||
/// Used with rules : last to update has priority
|
||||
pro_maat::GridPos nextTarget;
|
||||
|
||||
template<State targetState, EntityType targetType>
|
||||
friend class Rule;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue