1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-18 13:12:50 +00:00

73 lines
1.4 KiB
C++
Raw Normal View History

#include "actor.hpp"
2015-04-25 15:19:17 +02:00
#include "character.hpp"
namespace MWMechanics
{
Actor::Actor(const MWWorld::Ptr &ptr, MWRender::Animation *animation)
: mPositionAdjusted(false)
{
2015-04-25 15:19:17 +02:00
mCharacterController.reset(new CharacterController(ptr, animation));
}
void Actor::updatePtr(const MWWorld::Ptr &newPtr)
{
2015-04-25 15:19:17 +02:00
mCharacterController->updatePtr(newPtr);
}
CharacterController* Actor::getCharacterController()
{
2015-04-25 15:19:17 +02:00
return mCharacterController.get();
}
int Actor::getGreetingTimer() const
{
return mGreetingTimer;
}
void Actor::setGreetingTimer(int timer)
{
mGreetingTimer = timer;
}
float Actor::getAngleToPlayer() const
{
return mTargetAngleRadians;
}
void Actor::setAngleToPlayer(float angle)
{
mTargetAngleRadians = angle;
}
GreetingState Actor::getGreetingState() const
{
return mGreetingState;
}
void Actor::setGreetingState(GreetingState state)
{
mGreetingState = state;
}
bool Actor::isTurningToPlayer() const
{
return mIsTurningToPlayer;
}
void Actor::setTurningToPlayer(bool turning)
{
mIsTurningToPlayer = turning;
}
void Actor::setPositionAdjusted(bool adjusted)
{
mPositionAdjusted = adjusted;
}
bool Actor::getPositionAdjusted() const
{
return mPositionAdjusted;
}
}