Skip to content

Commit

Permalink
Added virtual to SetWorld fn
Browse files Browse the repository at this point in the history
  • Loading branch information
mdkdoc15 committed Dec 6, 2023
1 parent 0c8752f commit 2a8b3aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/core/Entity.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class Entity {
Entity & SetName(const std::string in_name) { name = in_name; return *this; }
Entity & SetPosition(GridPosition in_pos) { position = in_pos; return *this; }
Entity & SetPosition(double x, double y) { position = GridPosition{x,y}; return *this; }
Entity & SetWorld(WorldBase & in_world) { world_ptr = &in_world; return *this; }
virtual Entity & SetWorld(WorldBase & in_world) { world_ptr = &in_world; return *this; }

virtual bool IsAgent() const { return false; } ///< Is Entity an autonomous agent?
virtual bool IsItem() const { return false; } ///< Is Entity an item?
Expand Down

0 comments on commit 2a8b3aa

Please sign in to comment.