Base Mobile Class

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
RoninGT
Posts: 6
Joined: Sun Sep 17, 2006 3:53 pm

Base Mobile Class

Post by RoninGT »

My plans are to make a RPG maybe even a MMO just playing with the engine now, First would love to say so far it looks outstanding. However being new to it i have some newb questions.

I am building a base mobile class (For all characters/creatures) of the game. However not sure how i would referance the mesh for the creatures. Is that a "IAnimatedMesh" ? I have not got any code as of yet to display but wanted to clear that up before moving forward.

Anyway thanks for taking the time to read this poor newbs rant :)

Ronin
rikyoh
Posts: 14
Joined: Fri Sep 08, 2006 1:02 pm

Post by rikyoh »

Hi,

this is my code for such a class. The scenenode is created in the constructor with the scenemanager, that is stored in m_game.

Bye,
riky

Code: Select all

class CMobileIrrObject
{
protected:

	CGame*			m_game;
	vector3df				m_speed;
	IAnimatedMeshSceneNode*	m_node;
	bool					m_valid;
	
	CMobileIrrObject();
public:
	virtual					~CMobileIrrObject();
	
	// Inlines:
	CGame*			getGame() { return m_game; }
	void					setGame(CGame* game) { m_game = game; }
	vector3df				getSpeed() { return m_speed; }
	virtual void			setSpeed(vector3df s) { m_speed = s; }
	IAnimatedMeshSceneNode*	getNode() { return m_node; }
};
Post Reply