IBehavior script interface
The IBehavior
interface represents a kind of behavior, such as Bullet, Physics or Tween. Some behaviors derive from this class to add extra options that are global to the entire behavior, such as the physics world properties in the Physics behavior. This interface is usually accessed through the IBehaviorInstance behavior
property.
IBehavior APIs
- getAllInstances()
- Return an array of all instances that have this kind of behavior, for example every object with the Solid behavior. Note the returned instances may come from a range of different object types.
- static getByConstructor(ctor)
- Return an
IBehavior
from its constructor in the C3.Behaviors
namespace, or null
if it does not exist. For example IBehavior.getByConstructor(C3.Behaviors.Bullet)
will return the IBehavior
interface representing the Bullet behavior, or null
if the behavior is not used in the project.
Construct Animate Manual
Construct.net
2020-04-27
2024-06-24
You are here:
Search this manual:
This manual entry was last updated on 24 Jun, 2024 at 17:30