This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
dragengine:modules:dragonscript:behavior_outline [2020/05/24 13:11] – dragonlord | dragengine:modules:dragonscript:behavior_outline [2024/03/14 16:55] (current) – dragonlord | ||
---|---|---|---|
Line 3: | Line 3: | ||
[[: | [[: | ||
</ | </ | ||
+ | |||
+ | * [[behaviors_use_cases|Behaviors Explained: By Use-Case]] | ||
+ | * [[behaviors_a_to_z|Behaviors Explained: From A to Z]] | ||
====== ECBehaviorOutline ====== | ====== ECBehaviorOutline ====== | ||
Line 52: | Line 55: | ||
Multiple instances of ECBehaviorOutline can be used for example to create different outlines to switch on and off or to add multiple outline skins to a single ECBehaviorComponent. Keep in mind though that each instance of ECBehaviorOutline creates a new component and dynamic skin resource which can impact performance if the used model has high polygon count. To use multiple instances use code like this in your subclass constructor: | Multiple instances of ECBehaviorOutline can be used for example to create different outlines to switch on and off or to add multiple outline skins to a single ECBehaviorComponent. Keep in mind though that each instance of ECBehaviorOutline creates a new component and dynamic skin resource which can impact performance if the used model has high polygon count. To use multiple instances use code like this in your subclass constructor: | ||
< | < | ||
- | class MyElement | + | class MultiInstanceClass |
public var ECBehaviorComponent component | public var ECBehaviorComponent component | ||
public var ECBehaviorCollider collider | public var ECBehaviorCollider collider | ||
| | ||
- | public func new() | + | public func new() super(" |
component = ECBehaviorComponent.new(this) | component = ECBehaviorComponent.new(this) | ||
collider = ECBehaviorCollider.new(this, | collider = ECBehaviorCollider.new(this, | ||
Line 119: | Line 122: | ||
====== Optional Behaviors ====== | ====== Optional Behaviors ====== | ||
- | Thie behavior does not support optional behaviors. | + | This behavior does not support optional behaviors. |
====== Persistency ====== | ====== Persistency ====== | ||
Line 127: | Line 130: | ||
====== API Documentation ====== | ====== API Documentation ====== | ||
- | [[https:// | + | # |
Since DragonScript Module Version **1.1** | Since DragonScript Module Version **1.1** | ||
Line 142: | Line 145: | ||
| | ||
- | | + | |
- | // add behaviors: component, collider | + | // add required |
| | ||
| | ||
- | | ||
- | // set parameters | + | // |
- | // using a custom " | + | // |
+ | | ||
| | ||
| |