|
RavEngine
|
#include <ScriptComponent.hpp>
Public Member Functions | |
| ScriptComponent (Entity owner) | |
| virtual | ~ScriptComponent () |
| virtual void | Start () |
| virtual void | Stop () |
| virtual void | Tick (float fpsScale)=0 |
| Transform & | GetTransform () |
Public Member Functions inherited from RavEngine::ComponentWithOwner | |
| ComponentWithOwner (const decltype(owner) o) | |
| Entity | GetOwner () const |
Additional Inherited Members | |
Public Types inherited from RavEngine::Queryable< ScriptComponent > | |
| typedef std::array< ctti_t, ntypes > | arraytype |
Static Public Member Functions inherited from RavEngine::Queryable< ScriptComponent > | |
| static constexpr const arraytype & | GetQueryTypes () |
Public Attributes inherited from RavEngine::Queryable< ScriptComponent > | |
| constexpr | q_qt_def |
Static Public Attributes inherited from RavEngine::Queryable< ScriptComponent > | |
| static constexpr std::size_t | ntypes |
Protected Attributes inherited from RavEngine::ComponentWithOwner | |
| Entity | owner |
Define an Entity-side Script which can contain code. Subclass to add behavior. Be sure to invoke the base class constructor!
|
inlinevirtual |
Override to provide cleanup behavior.
| Transform & RavEngine::ScriptComponent::GetTransform | ( | ) |
Shortcut to get the transform component of the attached entity
| if | the script is not attached to any entity. |
|
inlinevirtual |
Invoked when the owning entity of this script has been added to the world.
|
inlinevirtual |
Called by the world when the owning entity has been despawned, but before despawn work has begun.
Invoked as the last step of the systems execution on a background thread. Any cross-object access must be appropriately protected.
| fpsScale | the frame rate scalar for this frame. |