From c12fcf8e7663c20e2c2c0696fb35a7059b83127a Mon Sep 17 00:00:00 2001 From: Joe Robinson Date: Tue, 8 Mar 2011 15:14:57 +0000 Subject: Implement weapons --- Weapon.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 Weapon.h (limited to 'Weapon.h') diff --git a/Weapon.h b/Weapon.h new file mode 100644 index 0000000..32abf28 --- /dev/null +++ b/Weapon.h @@ -0,0 +1,29 @@ +#ifndef WEAPON_H +#define WEAPON_H + +#include "Sprite.h" +#include "Projectile.h" + +class Weapon : public Sprite { + public: + Weapon(); + + int getDamage(); + int getSpeed(); + int getSize(); + + void setDamage(int damage); + void setSpeed(int speed); + void setSize(int size); + + /* Virtual function, can be altered for + different weapon types. */ + virtual void attack(); + + // 10 projectiles on screen at one time + Projectile projectiles[10]; + + protected: + int damage, speed, size, x, y, curProjectile; +}; +#endif -- cgit v1.2.3