Plasma Engine  2.0
Loading...
Searching...
No Matches
ScriptCoroutine_MoveTo.h
1#pragma once
2
3#include <Core/Scripting/ScriptCoroutine.h>
4#include <Core/World/Declarations.h>
5#include <Foundation/Math/CurveFunctions.h>
6
7class PL_CORE_DLL plScriptCoroutine_MoveTo : public plTypedScriptCoroutine<plScriptCoroutine_MoveTo, plGameObjectHandle, plVec3, plTime, plEnum<plCurveFunction>>
8{
9public:
10 void Start(plGameObjectHandle hObject, const plVec3& vTargetPos, plTime duration, plEnum<plCurveFunction> easing);
11 virtual Result Update(plTime deltaTimeSinceLastUpdate) override;
12
13private:
14 plGameObjectHandle m_hObject;
15 plVec3 m_vSourcePos;
16 plVec3 m_vTargetPos;
18
19 plTime m_Duration;
20 plTime m_TimePassed;
21};
22
23PL_DECLARE_REFLECTABLE_TYPE(PL_CORE_DLL, plScriptCoroutine_MoveTo);
Definition ScriptCoroutine_MoveTo.h:8
Base class of coroutines which are implemented in C++ to allow automatic unpacking of the arguments f...
Definition ScriptCoroutine.h:99
A custom enum implementation that allows to define the underlying storage type to control its memory ...
Definition Enum.h:37
A handle to a game object.
Definition Declarations.h:76
Definition ScriptCoroutine.h:51
The time class encapsulates a double value storing the time in seconds.
Definition Time.h:12