Both sides previous revisionPrevious revisionNext revision | Previous revision |
dragengine:modules:dragonscript:behavior_elements [2025/03/10 17:24] – [Examples] dragonlord | dragengine:modules:dragonscript:behavior_elements [2025/03/13 23:15] (current) – [XML Element Classes] dragonlord |
---|
| |
====== XML Element Classes ====== | ====== XML Element Classes ====== |
| |
| <WRAP center 100%> |
| <WRAP center box 1050px> |
| {{ youtube>heBLyt3b6G0?1000x591 }} |
| <WRAP centeralign>\\ |
| Video explaining what behavior factories are, what they can be used for and how they are created. Shown using ExampleApp which contains an example for this.</WRAP> |
| </WRAP> |
| </WRAP> |
| |
XML Element classes allow to create new element classes using an XML file (''*.deeclass'') instead of writing script code. XML element classes always subclass from an existing script class or XML element class. Using an XML element class you can change properties added by the behavior definitions. | XML Element classes allow to create new element classes using an XML file (''*.deeclass'') instead of writing script code. XML element classes always subclass from an existing script class or XML element class. Using an XML element class you can change properties added by the behavior definitions. |
This example creates a simple XML element class based on the #@LinkApiDocDEDS2_HTML~classDragengine_1_1Scenery_1_1SimpleElementClass.html,SimpleElementClass~@#. It modifies some element properties to use a specific model, skin and rig resource. The path are either absolute path (if starting with ''/'') or relative to the directory the ''*.deeclass'' file is located in. | This example creates a simple XML element class based on the #@LinkApiDocDEDS2_HTML~classDragengine_1_1Scenery_1_1SimpleElementClass.html,SimpleElementClass~@#. It modifies some element properties to use a specific model, skin and rig resource. The path are either absolute path (if starting with ''/'') or relative to the directory the ''*.deeclass'' file is located in. |
| |
| ++++ Show Example| |
<code xml> | <code xml> |
<?xml version='1.0' encoding='UTF-8'?> | <?xml version='1.0' encoding='UTF-8'?> |
</elementClass> | </elementClass> |
</code> | </code> |
| ++++ |
| |
This example creates a complex XML element class which is based on the #@LinkApiDocDEDS2_HTML~classDragengine_1_1Scenery_1_1GenericBehaviorElementClass.html,GenericBehaviorElementClass~@#. This allows adding behaviors inside the ''*.deeclass'' file avoiding the need to write an explicit script class to do the same. This is the example file used in the behavior factory video above. | This example creates a complex XML element class which is based on the #@LinkApiDocDEDS2_HTML~classDragengine_1_1Scenery_1_1GenericBehaviorElementClass.html,GenericBehaviorElementClass~@#. This allows adding behaviors inside the ''*.deeclass'' file avoiding the need to write an explicit script class to do the same. This is the example file used in the behavior factory video above. |
| |
| ++++ Show Example| |
<code xml> | <code xml> |
<?xml version='1.0' encoding='ISO-8859-1'?> | <?xml version='1.0' encoding='ISO-8859-1'?> |
</elementClass> | </elementClass> |
</code> | </code> |
| ++++ |
| |