Start Page » DragonScript Scripting Language » Behavior Elements: Quick and Easy Development » ECBCTRRBindings
Behavior element behavior adding bindings tag resolving using CTRRBinding.
Adds a CTRRBinding rule to ECBehaviorConversationActor.
This behavior can be used only once on an element.
Element class properties have the prefix ctrrBinding.
.
This behavior has no events.
This behavior does not support optional behaviors.
This behavior does not required element class to be persistable (setPersistable).
Since DragonScript Module Version 1.0
This example defines an element which support for conversation tag rules.
class MyElement extends BehaviorElementClass public var ECBehaviorConversationActor conversationActor public var ECBCTRRBindings ctrrBindings func new() conversationActor = ECBehaviorConversationActor.new(this) ctrrBindings = ECBCTRRBindings.new(this, conversationActor) end end
Using element class supporting adding behaviors the behavior can be added like this:
<?xml version='1.0' encoding='UTF-8'?> <elementClass name='MyClass' class='GenericBehaviorElement'> <behavior type='ECBehaviorConversationActor'/> <behavior type='ECBCTRRBindings'> <!-- optional: use BaseGameApp command mananager. game can add more supported values. default is 'default' --> <string name='commandManager'>default</string> <!-- optional: use BaseGameApp binding manager. game can add more supported values. default is 'default' --> <string name='bindingManager'>default</string> <!-- optional: use BaseGameApp subtitle theme. game can add more supported values. default is 'default'. also supported is value 'path:/path/to/theme.guitheme' --> <string name='subtitleTheme'>default</string> <!-- set element properties. omit property prefix if used inside behavior tag --> <string name='.name'>value</string> </behavior> <!-- for adding multiple behaviors use unique identifiers --> <behavior type='ECBCTRRBindings' id='second'/> </elementClass>