Page 1 of 1

Base Mobile Class

Posted: Sun Sep 17, 2006 3:57 pm
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

Posted: Sun Sep 17, 2006 4:13 pm
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; }
};