User Tools

Site Tools


dragengine:modules:dragonscript:behavior_animated

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
dragengine:modules:dragonscript:behavior_animated [2025/03/12 14:45] – [Events] dragonlorddragengine:modules:dragonscript:behavior_animated [2025/03/13 17:10] (current) dragonlord
Line 1: Line 1:
 {{tag>dragonscript behavior}} {{tag>dragonscript behavior}}
 <WRAP youarehere> <WRAP youarehere>
-[[:start|Start Page]] >> [[main|DragonScript Scripting Language]] >> [[abstractions#behavior_elementsquick_and_easy_development|Behavior Elements: Quick and Easy Development]] >> **ECBehaviorAnimated**+[[:start|Start Page]] >> [[main|DragonScript Scripting Language]] >> [[dragengine:modules:dragonscript:abstractions|Abstraction Layers: How you want to build your Game]] >> [[dragengine:modules:dragonscript:behavior_elements|Behavior Elements]] >> **ECBehaviorAnimated**
 </WRAP> </WRAP>
  
Line 131: Line 131:
 ====== Required Behaviors ====== ====== Required Behaviors ======
  
-This behavior requires these other behaviors: 
   * [[behavior_component|ECBehaviorComponent]]   * [[behavior_component|ECBehaviorComponent]]
  
Line 164: Line 163:
     component = ECBehaviorComponent.new(this, null)     component = ECBehaviorComponent.new(this, null)
     animated = ECBehaviorAnimated.new(this, component)     animated = ECBehaviorAnimated.new(this, component)
 +  end
 +end
 +</code>
 +
 +Example of using listeners.
 +
 +<code>
 +class MyListener extends ECBehaviorInstance.DefaultListener
 +  var AnimatorController pController
 +  
 +  func new(ECBehaviorAnimated behavior)
 +    pController = behavior.getAnimatorInstance().getControllerNamed("special controller")
 +  end
 +  
 +  func void updateControllers(Instance instance, float elapsed)
 +    pController.increment(elapsed)
   end   end
 end end
dragengine/modules/dragonscript/behavior_animated.1741790704.txt.gz · Last modified: 2025/03/12 14:45 by dragonlord