This shows you the differences between two versions of the page.
Next revisionBoth sides next revision | |||
dragengine:modules:dragonscript:abstractions [2019/04/25 19:03] – created dragonlord | dragengine:modules:dragonscript:abstractions [2019/04/25 19:39] – [Behavior Elements: Quick and Easy Development] dragonlord | ||
---|---|---|---|
Line 98: | Line 98: | ||
</ | </ | ||
+ | If you want to also add run-time behavior on top of the behavior without creating your own behavior you can modify the code like this: | ||
+ | < | ||
+ | class MyTrainClass extends BehaviorElementClass | ||
+ | ... | ||
+ | protected func Element createElement() | ||
+ | return MyTrain.new(this) | ||
+ | end | ||
+ | end | ||
+ | class MyTrain extends BehaviorElement | ||
+ | public func new(MyTrainClass eclass) super(eclass) | ||
+ | ... | ||
+ | end | ||
+ | end | ||
+ | </ | ||
====== Scenery Elements: Customized and Optimized for Special Needs ====== | ====== Scenery Elements: Customized and Optimized for Special Needs ====== | ||