externalInitialisable
Index
Methods
Methods
externalinitialise
Initialises the ability. Invoked whenever
Actor.attemptsTo
method is called, but only whenInitialisable.isInitialised
returns false.Make sure to implement
Initialisable.isInitialised
so that it returnstrue
when the ability has been successfully initialised.Returns void | Promise<void>
externalisInitialised
Should return
true
when all the resources that the given ability needs have been initialised. Should returnfalse
if theActor
should initialise them again whenActor.attemptsTo
is called.Returns boolean
An interface to be implemented by any
Ability
that needs to initialise the resources it uses, e.g. establish a database connection.The
Initialisable.initialise
method is invoked wheneverActor.attemptsTo
method is called, but only whenInitialisable.isInitialised
returns false. This is to avoid initialising abilities more than once.Learn more
Ability
AbilityType
Discardable