2022-09-03 02:52:57 +00:00
|
|
|
#include "WblRobotCitizen.h"
|
|
|
|
#include "GameMessages.h"
|
|
|
|
|
|
|
|
void WblRobotCitizen::OnStartup(Entity* self) {
|
2022-09-04 03:26:00 +00:00
|
|
|
// TODO: make it move via controllable physics
|
2022-09-03 02:52:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void WblRobotCitizen::OnUse(Entity* self, Entity* user) {
|
|
|
|
auto movingPlatformComponent = self->GetComponent<MovingPlatformComponent>();
|
|
|
|
if (movingPlatformComponent) movingPlatformComponent->StopPathing();
|
|
|
|
auto face = NiQuaternion::LookAt(self->GetPosition(), user->GetPosition());
|
|
|
|
self->SetRotation(face);
|
|
|
|
GameMessages::SendPlayAnimation(self, u"wave");
|
|
|
|
self->AddTimer("animation time", m_AnimationTime);
|
|
|
|
}
|
|
|
|
|
|
|
|
void WblRobotCitizen::OnTimerDone(Entity* self, std::string timerName) {
|
2022-09-04 03:26:00 +00:00
|
|
|
// TODO: make it move via controllable physics
|
2022-09-03 02:52:57 +00:00
|
|
|
}
|