Danbias/Code/Game/GameLogic/AttatchmentGun.h

39 lines
843 B
C
Raw Permalink Normal View History

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
{
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;
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);
static void BulletCollision(Oyster::Physics::ICustomBody *obj, void* args);
2014-02-27 14:38:03 +01:00
};
}
#endif