diff options
author | Stijn Buys <ingar@osirion.org> | 2013-11-10 12:19:01 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2013-11-10 12:19:01 +0000 |
commit | 7ddcc5fe68c58205ced08c596b74b74b85de2d4e (patch) | |
tree | 257fecf3dd21c2e1fb44d7f9cd7491d7ad07ab35 /src/game/base/waypoint.h | |
parent | 714ca6fdf281e0a9503d3a0cfe683ac78fc1d30c (diff) |
Separated the WayPoint class into its own files.
Diffstat (limited to 'src/game/base/waypoint.h')
-rw-r--r-- | src/game/base/waypoint.h | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/src/game/base/waypoint.h b/src/game/base/waypoint.h new file mode 100644 index 0000000..ce18930 --- /dev/null +++ b/src/game/base/waypoint.h @@ -0,0 +1,61 @@ +/* + base/waypoint.h + This file is part of the Osirion project and is distributed under + the terms and conditions of the GNU General Public License version 2 +*/ + +#ifndef __INCLUDED_BASE_WAYPOINT_H__ +#define __INCLUDED_BASE_WAYPOINT_H__ + +#include "core/entity.h" +#include "base/cargo.h" + +namespace game +{ + +/** +* @brief a node in the patrol's travel path +* */ +class WayPoint { +public: + WayPoint(); + ~WayPoint(); + + inline core::Entity *target() + { + return waypoint_target; + } + + inline const std::string & target_label() const { + return waypoint_target_label; + } + + inline const bool dock() const { + return waypoint_dock; + } + + inline const Cargo *cargo() const { + return waypoint_cargo; + } + + void set_target(core::Entity *entity); + + void set_target_label(const std::string &label); + + void set_cargo(Cargo *cargo); + + void set_dock(const bool dock); + +private: + std::string waypoint_target_label; + + core::Entity *waypoint_target; + + Cargo *waypoint_cargo; + + bool waypoint_dock; +}; + +} // namespace game + +#endif // __INCLUDED_BASE_WAYPOINT_H__ |