2014-01-31 08:23:00 +13:00
|
|
|
|
|
|
|
|
#ifndef EMITTER_H
|
|
|
|
|
#define EMITTER_H
|
|
|
|
|
|
2019-01-18 15:55:06 +01:00
|
|
|
#include "object.hpp"
|
2014-01-31 08:23:00 +13:00
|
|
|
|
|
|
|
|
class gxSound;
|
|
|
|
|
class gxChannel;
|
|
|
|
|
|
2019-01-18 17:04:17 +01:00
|
|
|
class Emitter : public Object {
|
|
|
|
|
public:
|
2014-01-31 08:23:00 +13:00
|
|
|
Emitter();
|
2019-01-18 17:04:17 +01:00
|
|
|
Emitter(const Emitter& t);
|
2014-01-31 08:23:00 +13:00
|
|
|
~Emitter();
|
|
|
|
|
|
|
|
|
|
//Entity interface
|
2019-01-18 17:04:17 +01:00
|
|
|
Entity* clone()
|
|
|
|
|
{
|
|
|
|
|
return d_new Emitter(*this);
|
|
|
|
|
}
|
|
|
|
|
Emitter* getEmitter()
|
|
|
|
|
{
|
|
|
|
|
return this;
|
|
|
|
|
}
|
2014-01-31 08:23:00 +13:00
|
|
|
|
|
|
|
|
//Object interface
|
2019-01-18 17:04:17 +01:00
|
|
|
void beginRender(float tween);
|
2014-01-31 08:23:00 +13:00
|
|
|
|
|
|
|
|
//Public interface
|
2019-01-18 17:04:17 +01:00
|
|
|
gxChannel* emitSound(gxSound* sound);
|
2014-01-31 08:23:00 +13:00
|
|
|
|
2019-01-18 17:04:17 +01:00
|
|
|
private:
|
|
|
|
|
Vector pos, vel;
|
2014-01-31 08:23:00 +13:00
|
|
|
|
|
|
|
|
vector<gxChannel*> channels;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif
|