Drag[en]gine Script Module DragonScript
1.23
|
Behavior element behavior adding interact prompt support to player actor. More...
Classes | |
class | BlockListenerFactory |
Factory creating listeners using block. More... | |
class | DefaultListener |
Default implementation of behavior instance listener. More... | |
class | Instance |
Behavior instance. More... | |
interface | Listener |
Listener for behavior instance events. More... | |
interface | ListenerFactory |
Factory creating listeners. More... | |
interface | PromptController |
Interact prompt controller interface. More... | |
interface | PromptControllerFactory |
Factory creating interact prompt controller interfaces. More... | |
Additional Inherited Members | |
Public Member Functions inherited from Dragengine.Scenery.DefaultECBehavior | |
void | assignInstanceIndex (int instanceIndex) |
Assign instance index. More... | |
void | dispose () |
Dispose of behavior. More... | |
String | getBehaviorID () |
Unique identifier of behavior. More... | |
String | getID () |
Identifier. More... | |
int | getInstanceIndex () |
Instance index. More... | |
void | loadSupportedData (String identifier, PersistencyEnvironment env, FileReader reader, ECBehaviorInstance instance) |
Load instance data of another behavior. More... | |
bool | supportsBehaviorID (String identifier) |
Behavior supports loading instance data of another behavior. More... | |
Public Member Functions inherited from Dragengine.Scenery.ECBehavior | |
ECBehaviorInstance | createInstance (BehaviorElement element) |
Create Behavior instance. More... | |
Protected Member Functions inherited from Dragengine.Scenery.DefaultECBehavior | |
DefaultECBehavior | new (BehaviorElementClass eclass) |
Create default composeable behavior with empty identifier. More... | |
DefaultECBehavior | new (BehaviorElementClass eclass, String id) |
Create default composeable behavior. More... | |
void | setBehaviorID (String identifier) |
Set behavior identifier. More... | |
void | useClassNameAsBehaviorID () |
Set behavior identifier to "<class-name>:<identifier>". More... | |
void | useFullyQualifiedClassNameAsBehaviorID () |
Set behavior identifier to "<fully-qualified-class-name>:<identifier>". More... | |
Behavior element behavior adding interact prompt support to player actor.
In contrary to ECBehaviorPlayerLookAtInteractPrompt this behavior allows showing ECBehaviorInteractPrompt assigned to the player itself. This can be used show prompts if the player is doing something specific like sitting on a chair to show how he can get up or if the player is mounted on an object to show controls.
If the actor is the player controlled actor creates a UI panel overlayed on the HUD showing interaction prompts. If the actor is not the active player actor destroys the UI panel.
If the player has ECBehaviorInteractPrompt the UI panel is shown and updated with the prompt information. Otherwise the UI panel is cleared and hidden.
The widget is shown inside a container Panel created by the behavior. The default layout of the panel is CentrizedBoxLayout. Change the layout instance to use your own.
While player is the active actor this behavior polls every frame update for changes in prompts and updates the prompt display. This ensures dynamic changes on prompts can be detected. While the player is not the active actor this behavior disables per-frame updates to not waste performance.
It is possible to temporarily disabled this behavior. This allows to hide interact prompts for example if the player is performing an action where he is not able to interact with anything, for example being in a conversation or playing a cutscene.
This behavior is used for player actors only.
Uses property prefix "playerInteractPrompt."