Danbias/Code/Game/GameLogic/Object.h

48 lines
1.1 KiB
C
Raw Normal View History

2013-11-28 08:33:29 +01:00
//////////////////////////////////////////////////
//Created by Erik and Linda of the GameLogic team
//////////////////////////////////////////////////
2013-11-19 18:35:35 +01:00
#ifndef OBJECT_H
#define OBJECT_H
#include "GameLogicStates.h"
#include <PhysicsAPI.h>
2013-11-19 18:35:35 +01:00
namespace GameLogic
{
2014-01-20 15:47:52 +01:00
class Game;
class Object
2013-11-19 18:35:35 +01:00
{
2013-11-29 09:23:00 +01:00
public:
Object();
Object(void* collisionFunc, OBJECT_TYPE type);
2014-01-23 09:14:04 +01:00
Object(Oyster::Physics::ICustomBody *rigidBody ,void* collisionFunc, OBJECT_TYPE type);
2014-01-27 08:54:25 +01:00
Object(Oyster::Physics::ICustomBody *rigidBody ,void (*collisionFunc)(Oyster::Physics::ICustomBody *proto,Oyster::Physics::ICustomBody *deuter,Oyster::Math::Float kineticEnergyLoss), OBJECT_TYPE type);
~Object(void);
2013-11-19 18:35:35 +01:00
OBJECT_TYPE GetType() const;
int GetID() const;
Oyster::Physics::ICustomBody* GetRigidBody();
void ApplyLinearImpulse(Oyster::Math::Float4 force);
2014-01-20 15:47:52 +01:00
void BeginFrame();
void EndFrame();
2013-11-19 18:35:35 +01:00
private:
2013-11-26 11:30:49 +01:00
OBJECT_TYPE type;
2013-12-18 13:01:13 +01:00
int objectID;
2014-01-20 15:47:52 +01:00
2013-11-19 18:35:35 +01:00
protected:
Oyster::Physics::ICustomBody *rigidBody;
Oyster::Physics::ICustomBody::State setState;
Oyster::Physics::ICustomBody::State getState;
2014-01-20 15:47:52 +01:00
static const Game* gameInstance;
2013-11-19 18:35:35 +01:00
};
}
#endif