IComponent.h
#ifndef ICOMPONENT_H_#define ICOMPONENT_H_//#include "GameObject.h"#include "ComponentMessage.h"#include "GameObject.h"namespace Platform{ namespace GameObjets { class GameObject; } namespace Components { class IComponent { public: virtual void Init() = 0; virtual void Update() = 0; virtual void Deinit() = 0; virtual void ExecuteMessage(ComponentMessage *iMessage) { /* By default this method don't do nothing.. So every component that want to do something with a message, can override this method! */ }; void SetOwner(GameObjects::GameObject *iGameObject) { mGameObject = iGameObject; } GameObjects::GameObject *GetOwner() { return mGameObject; } private: GameObjects::GameObject *mGameObject; }; }}#endif
AnimationComponent.h
#ifndef ANIMATIONCOMPONENT_H_#define ANIMATIONCOMPONENT_H_#include "IComponent.h"namespace Platform{ namespace Components { namespace Animation { class AnimationComponent : public IComponent { public: virtual void Init() = 0; virtual void Update() = 0; virtual void Deinit() = 0; virtual void ExecuteMessage() {}; virtual void SetAnimation(const Ogre::String &iAnimationID, bool loop) { ... } virtual void Blend(const Ogre::String &iAnimationID, Ogre::Real iDuration, bool iLoop) { ... } Ogre::Entity *GetEntity() { return mEntity; } void SetEntity(Ogre::Entity *iEntity) { mEntity = iEntity; } protected: virtual void PerformIdle() {}; protected: Ogre::Quaternion mOrientation; /* Animation Parameters */ Ogre::AnimationState *mAnDestination; Ogre::AnimationState *mAnimationState; Ogre::AnimationStateSet *mAnimationSet; Ogre::AnimationStateIterator mAnimationItr; Ogre::Real mTimeLeft; Ogre::Real mDuration; bool mComplete; bool mLoop; Ogre::Entity *mEntity; }; } }}#endif
ProtagonistAnimationComponent.h
#ifndef PROTAGONISTANIMATIONCOMPONENT_H_#define PROTAGONISTANIMATIONCOMPONENT_H_#include <Ogre.h>#include "AnimationComponent.h"namespace Platform{ namespace Components { namespace Animation { class ProtagonistAnimationComponent : public AnimationComponent { public: ProtagonistAnimationComponent(); ~ProtagonistAnimationComponent(); void Init(); void Update(); void Deinit(); protected: void ExecuteMessage(ComponentMessage *iMessage); void PerformIdle(); void PerformOrientation(); private: private: Ogre::Degree mAngle; Ogre::Quaternion mOrToReach; }; } }}#endif
I recieve the error when i try to define the costructor of my class ProtagonistAnimationComponent, the strange thing is that i can compile without problem all others Components like "Movable, Renderable" etc etc..
Anyone can help me? Thanks a lot!