openmw-tes3coop/apps/openmw/mwmechanics/character.hpp
2013-01-16 16:31:09 -08:00

45 lines
879 B
C++

#ifndef GAME_MWMECHANICS_CHARACTER_HPP
#define GAME_MWMECHANICS_CHARACTER_HPP
#include "../mwworld/ptr.hpp"
namespace MWRender
{
class Animation;
}
namespace MWMechanics
{
enum CharacterState {
CharState_Idle,
CharState_Dead
};
class CharacterController
{
MWWorld::Ptr mPtr;
MWRender::Animation *mAnimation;
CharacterState mState;
protected:
/* Called by the animation whenever a new text key is reached. */
void markerEvent(const std::string &evt);
friend class MWRender::Animation;
public:
CharacterController(const MWWorld::Ptr &ptr, MWRender::Animation *anim, CharacterState state);
CharacterController(const CharacterController &rhs);
void update(float duration);
void setState(CharacterState state);
CharacterState getState() const
{ return mState; }
};
}
#endif /* GAME_MWMECHANICS_CHARACTER_HPP */