User Tools

Site Tools


dragengine:modules:dragonscript:abstractions

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revisionBoth sides next revision
dragengine:modules:dragonscript:abstractions [2019/04/25 19:03] – created dragonlorddragengine:modules:dragonscript:abstractions [2019/04/25 19:39] – [Behavior Elements: Quick and Easy Development] dragonlord
Line 98: Line 98:
 </code> </code>
  
 +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:
 +<code>
 +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
 +</code>
 ====== Scenery Elements: Customized and Optimized for Special Needs ====== ====== Scenery Elements: Customized and Optimized for Special Needs ======
  
dragengine/modules/dragonscript/abstractions.txt · Last modified: 2024/03/14 16:43 by dragonlord