From 7bdab72e2ddf145a4692ae92b22110c2e7febe67 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Mon, 11 Nov 2013 00:41:33 +0000 Subject: Support for station weapons. --- src/game/base/platform.h | 75 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 src/game/base/platform.h (limited to 'src/game/base/platform.h') diff --git a/src/game/base/platform.h b/src/game/base/platform.h new file mode 100644 index 0000000..3a8bddf --- /dev/null +++ b/src/game/base/platform.h @@ -0,0 +1,75 @@ +/* + base/platform.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_PLATFORM_H__ +#define __INCLUDED_BASE_PLATFORM_H__ + +#include "base/weapon.h" + +namespace game +{ + +/** + * @brief a weapons platform + * This class also serves as base class for the Station class, + **/ +class Platform : public core::Entity +{ +public: + /** + * @brief constructor + * */ + Platform(); + + /** + * @brief destructor + * */ + virtual ~Platform(); + + /* -- inspectors ------------------------------------------- */ + + /** + * @brief the type of cannons the Platform will use + * */ + inline const Weapon *cannon() const + { + return platform_cannon; + } + + /** + * @brief the type of turrets the Platform will use + * */ + inline const Weapon *turret() const + { + return platform_turret; + } + + /* -- mutators --------------------------------------------- */ + + /** + * @brief set the type of cannons the Platform will use + * */ + void set_cannon(const Weapon *cannon); + + /** + * @brief set the type of turrets the Platform will use + * */ + void set_turret(const Weapon *turret); + + /** + * @brief run a game frame + * */ + virtual void frame(const unsigned long elapsed); + +private: + const Weapon *platform_cannon; + const Weapon *platform_turret; +}; + +} + +#endif // __INCLUDED_BASE_SHIPDEALER_H__ + -- cgit v1.2.3