2014-02-27 14:38:03 +01:00
|
|
|
//////////////////////////////////////////////////
|
|
|
|
//Created by Erik of the GameLogic team
|
|
|
|
//////////////////////////////////////////////////
|
|
|
|
#ifndef ATTATCHMENTGUN_H
|
|
|
|
#define ATTATCHMENTGUN_H
|
|
|
|
#include "IAttatchment.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace GameLogic
|
|
|
|
{
|
2014-02-27 15:15:44 +01:00
|
|
|
const Oyster::Math::Float standardDamage = 10.0f;
|
|
|
|
const Oyster::Math::Float standardCooldown = 0.5f;
|
|
|
|
|
2014-02-27 14:38:03 +01:00
|
|
|
class AttatchmentGun : public IAttatchment
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
AttatchmentGun(void);
|
|
|
|
AttatchmentGun(Player &owner);
|
|
|
|
~AttatchmentGun(void);
|
|
|
|
|
|
|
|
|
|
|
|
void UseAttatchment(const WEAPON_FIRE &usage, float dt);
|
|
|
|
void Update(float dt);
|
|
|
|
|
|
|
|
private:
|
|
|
|
Oyster::Math::Float damage;
|
2014-02-27 15:15:44 +01:00
|
|
|
Oyster::Math::Float Cooldown;
|
|
|
|
Oyster::Math::Float TimeUntilFire;
|
|
|
|
|
2014-02-27 14:38:03 +01:00
|
|
|
private:
|
|
|
|
void ShootBullet(const WEAPON_FIRE &usage, float dt);
|
2014-02-27 15:15:44 +01:00
|
|
|
static void BulletCollision(Oyster::Physics::ICustomBody *obj, void* args);
|
|
|
|
|
2014-02-27 14:38:03 +01:00
|
|
|
};
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|