ScriptCollectibleWrapper class
Wraps a scripted collectible actor, forwarding engine callbacks to the AngelScript object.
Specialization of ScriptActorWrapper for collectible items, adding the bobbing/floating behavior and an OnCollect callback dispatched to the backing script object when a player picks the item up.
Base classes
- class ScriptActorWrapper
- Wraps a scripted actor, forwarding engine callbacks to the AngelScript object.
Constructors, destructors, conversion operators
- ScriptCollectibleWrapper(LevelScriptLoader* levelScripts, asIScriptObject* obj)
- Creates a new instance.
Public functions
- auto OnHandleCollision(ActorBase* other) -> bool override
Protected functions
-
auto OnActivatedAsync(const Actors::
ActorActivationDetails& details) -> Task<bool> override - Called when the object is created and activated.
-
auto OnCollect(Actors::
Player* player) -> bool - Called when the collectible is collected by the specified player.
Function documentation
Jazz2:: Scripting:: ScriptCollectibleWrapper:: ScriptCollectibleWrapper(LevelScriptLoader* levelScripts,
asIScriptObject* obj)
Creates a new instance.
| Parameters | |
|---|---|
| levelScripts | Owning level script loader |
| obj | Backing AngelScript object |