externalInitialisable
Index
Methods
Methods
externalinitialise
Initialises the ability. Invoked whenever
Actor.attemptsTomethod is called, but only whenInitialisable.isInitialisedreturns false.Make sure to implement
Initialisable.isInitialisedso that it returnstruewhen the ability has been successfully initialised.Returns void | Promise<void>
externalisInitialised
Should return
truewhen all the resources that the given ability needs have been initialised. Should returnfalseif theActorshould initialise them again whenActor.attemptsTois called.Returns boolean
An interface to be implemented by any
Abilitythat needs to initialise the resources it uses, e.g. establish a database connection.The
Initialisable.initialisemethod is invoked wheneverActor.attemptsTomethod is called, but only whenInitialisable.isInitialisedreturns false. This is to avoid initialising abilities more than once.Learn more
AbilityAbilityTypeDiscardable