Danbias/Code/Game/GameLogic/DynamicObject.h

48 lines
2.0 KiB
C
Raw Normal View History

2013-11-28 08:33:29 +01:00
//////////////////////////////////////////////////
//Created by Erik and Linda of the GameLogic team
//////////////////////////////////////////////////
#ifndef DYNAMICOBJECT_H
#define DYNAMICOBJECT_H
2013-12-19 10:21:03 +01:00
#include "GameLogicDef.h"
2013-12-20 08:59:46 +01:00
#include "Object.h"
namespace GameLogic
{
2014-02-25 10:37:33 +01:00
class Player;
class DynamicObject : public Object
{
public:
2013-12-05 11:50:39 +01:00
DynamicObject();
DynamicObject(Oyster::Physics::ICustomBody *rigidBody , void (*EventOnCollision)(Oyster::Physics::ICustomBody *proto,Oyster::Physics::ICustomBody *deuter,Oyster::Math::Float kineticEnergyLoss), ObjectSpecialType type, int objectID);
DynamicObject(Oyster::Physics::ICustomBody *rigidBody , Oyster::Physics::ICustomBody::SubscriptMessage (*EventOnCollision)(Oyster::Physics::ICustomBody *proto,Oyster::Physics::ICustomBody *deuter,Oyster::Math::Float kineticEnergyLoss), ObjectSpecialType type, int objectID);
2014-02-12 14:48:58 +01:00
DynamicObject(Oyster::Physics::ICustomBody *rigidBody , void (*EventOnCollision)(Oyster::Physics::ICustomBody *proto,Oyster::Physics::ICustomBody *deuter,Oyster::Math::Float kineticEnergyLoss), ObjectSpecialType type, int objectID, Oyster::Math::Float extraDamageOnCollision);
DynamicObject(Oyster::Physics::ICustomBody *rigidBody , Oyster::Physics::ICustomBody::SubscriptMessage (*EventOnCollision)(Oyster::Physics::ICustomBody *proto,Oyster::Physics::ICustomBody *deuter,Oyster::Math::Float kineticEnergyLoss), ObjectSpecialType type, int objectID, Oyster::Math::Float extraDamageOnCollision);
~DynamicObject(void);
void ReleaseDynamicObject();
bool IsReleased();
bool IsActive();
void Inactivate();
void Activate();
2014-02-25 10:37:33 +01:00
void SetAffectedBy(GameLogic::Player &player);
void RemoveAffectedBy();
GameLogic::Player* getAffectingPlayer();
static void DynamicObject::DynamicDefaultOnCollision(Oyster::Physics::ICustomBody *rigidBodyObject, Oyster::Physics::ICustomBody *obj, Oyster::Math::Float kineticEnergyLoss);
2013-12-05 11:50:39 +01:00
private:
bool isActive;
bool isReleased;
2014-02-25 10:37:33 +01:00
protected:
GameLogic::Player *affectedBy;
};
}
#endif