Jazz2::Scripting::ScriptActorWrapper class

Base classes

class Jazz2::Actors::ActorBase
Base class of an object.

Derived classes

class ScriptCollectibleWrapper

Public static functions

static void RegisterFactory(asIScriptEngine* engine, asIScriptModule* module)
static auto Factory(int actorType) -> ScriptActorWrapper*

Constructors, destructors, conversion operators

ScriptActorWrapper(LevelScriptLoader* levelScripts, asIScriptObject* obj)
~ScriptActorWrapper()

Public functions

void AddRef()
void Release()
auto operator=(const ScriptActorWrapper& o) -> ScriptActorWrapper&
auto OnHandleCollision(std::shared_ptr<ActorBase> other) -> bool override

Protected functions

auto OnActivatedAsync(const Actors::ActorActivationDetails& details) -> Task<bool> override
Called when the object is created and activated.
auto OnTileDeactivated() -> bool override
Called when corresponding tile should be deactivated.
void OnHealthChanged(ActorBase* collider) override
auto OnPerish(ActorBase* collider) -> bool override
void OnUpdate(float timeMult) override
Called every frame to update the object state.
void OnUpdateHitbox() override
Called when the hitbox needs to be updated.
auto OnDraw(RenderQueue& renderQueue) -> bool override
Called when the object needs to be drawn.
void OnHitFloor(float timeMult) override
Called when the object hits a floor.
void OnHitCeiling(float timeMult) override
Called when the object hits a ceiling.
void OnHitWall(float timeMult) override
Called when the object hits a wall.
void OnAnimationStarted() override
Called when an animation started.
void OnAnimationFinished() override
Called when an animation finished.
auto asGetAlpha() const -> float
void asSetAlpha(float value)
auto asGetLayer() const -> uint16_t
void asSetLayer(uint16_t value)
void asDecreaseHealth(int amount)
auto asMoveTo(float x, float y, bool force) -> bool
auto asMoveBy(float x, float y, bool force) -> bool
void asTryStandardMovement(float timeMult)
void asRequestMetadata(const String& path)
void asPlaySfx(const String& identifier, float gain, float pitch)
void asSetAnimation(const String& name)
void asSetAnimationState(int state)

Protected variables

LevelScriptLoader* _levelScripts
asIScriptObject* _obj
asILockableSharedBool* _isDead
uint32_t _scoreValue