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 revision
Previous revision
Next revisionBoth sides next revision
dragengine:modules:dragonscript:abstractions [2019/04/25 19:03] – created dragonlorddragengine:modules:dragonscript:abstractions [2019/05/08 17:28] dragonlord
Line 1: Line 1:
 +{{tag>dragonscript project behavior}}
 <WRAP youarehere> <WRAP youarehere>
 [[:start|Start Page]] >> [[dragengine:modules:dragonscript:main|DragonScript Scripting Language]] >> **Abstraction Layers: How you want to build your Game** [[:start|Start Page]] >> [[dragengine:modules:dragonscript:main|DragonScript Scripting Language]] >> **Abstraction Layers: How you want to build your Game**
Line 98: Line 99:
 </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