#ifndef ENTITY_H
#define ENTITY_H

#include <irrlicht.h>
using namespace irr;

class Entity
{
protected:
	core::vector2df pos;
	core::vector2df oldPos;
	core::vector2df accel;
	scene::ISceneNode* sceneNode;
	int id;
	static int entityCount;

public:
	float repulsiveForce;
	float radius;
	bool attracts;
	bool canLandOn;
	bool isConnected;

	int getId()
	{
		return id;
	}

	Entity(scene::ISceneManager* smgr, core::vector2df pos);
	virtual ~Entity();

	virtual bool ownsSceneNode(scene::ISceneNode* node)
	{
		return node == sceneNode;
	}

	virtual const core::vector2df& getPos()
	{
		return pos;
	}

	virtual void clearForce()
	{
		accel.X = 0;
		accel.Y = 0;
	}

	virtual void addForce(core::vector2df f)
	{
		accel += f;
	}

	virtual core::vector2df calcNewPos(float deltaTime);
	virtual void setPos(core::vector2df newPos);
};


#endif
