This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
dragengine:modules:dragonscript:behavior_occupier [2020/11/23 16:15] – [position] dragonlord | dragengine:modules:dragonscript:behavior_occupier [2025/03/13 17:14] (current) – dragonlord | ||
---|---|---|---|
Line 1: | Line 1: | ||
{{tag> | {{tag> | ||
<WRAP youarehere> | <WRAP youarehere> | ||
- | [[: | + | [[: |
</ | </ | ||
Line 8: | Line 8: | ||
====== ECBehaviorOccupier ====== | ====== ECBehaviorOccupier ====== | ||
+ | |||
+ | <WRAP center 100%> | ||
+ | <WRAP center box 450px> | ||
+ | {{youtube> | ||
+ | <WRAP centeralign> | ||
+ | </ | ||
+ | </ | ||
Behavior element behavior adding support to uccipy an [[behavior_interactionspot|CBehaviorInteractionSpot]]. | Behavior element behavior adding support to uccipy an [[behavior_interactionspot|CBehaviorInteractionSpot]]. | ||
Line 19: | Line 26: | ||
====== Element Class Properties ====== | ====== Element Class Properties ====== | ||
- | Element class properties have the prefix | + | Element class properties have the prefix |
- | This behavior does not define element properties. | + | ====== Events ====== |
+ | |||
+ | ===== spotClaimed ===== | ||
+ | |||
+ | Occupier claimed interaction spot. | ||
+ | |||
+ | ===== spotReleased (Instance instance, ECBehaviorInteractionSpot.Instance interactionSpot) | ||
+ | |||
+ | Occupier released interaction spot. | ||
====== Required Behaviors ====== | ====== Required Behaviors ====== | ||
+ | |||
This behavior does not required other behaviors to be present. | This behavior does not required other behaviors to be present. | ||
====== Optional Behaviors ====== | ====== Optional Behaviors ====== | ||
+ | |||
This behavior does not support optional behaviors. | This behavior does not support optional behaviors. | ||
====== Persistency ====== | ====== Persistency ====== | ||
- | This behavior does support element class to be persistable (setPersistable). Saves [[behavior_interactionspot|CBehaviorInteractionSpot]] if present. | + | |
+ | This behavior does support element class to be persistable (setPersistable). | ||
====== API Documentation ====== | ====== API Documentation ====== | ||
- | [[https:// | + | # |
- | Since DragonScript Module Version | + | Since DragonScript Module Version |
====== Use Cases ====== | ====== Use Cases ====== | ||
Line 75: | Line 93: | ||
end | end | ||
</ | </ | ||
+ | |||
+ | ====== Behavior Factory ====== | ||
+ | |||
+ | Using element class supporting adding behaviors the behavior can be added like this: | ||
+ | <code xml> | ||
+ | <?xml version=' | ||
+ | < | ||
+ | < | ||
+ | <!-- set element properties. omit property prefix if used inside behavior tag --> | ||
+ | <string name=' | ||
+ | </ | ||
+ | | ||
+ | <!-- for adding multiple behaviors use unique identifiers --> | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | ====== Live Examples ====== | ||
+ | |||
+ | In the [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ |