Method: removeBehaviour

Removes a behaviour to the object's active behaviour list by it's id.
removeBehaviour (String id, Boolean duringTick)
  • Stringid
  • BooleanduringTick If true will look to remove the behaviour from the tick method rather than the update method.
Returns * Returns this on success or false on failure.

Remove a behaviour with the id "myBehaviour"

var entity = new IgeEntity();
entity.addBehaviour('myBehaviour', function () {
    // Code here will execute during each engine update for
    // this entity. I can access the entity via the "this"
    // keyword such as:
    this._somePropertyOfTheEntity = 'moo';

// Now remove the "myBehaviour" behaviour
© Copyright 2013 Irrelon Software Limited. All Rights Reserved. UK Registered Company Number: 07522767
Isogenic (ī´sōjen´ik): Adj originating from a common source; possessing the same genetic composition.
Strange Things Happen at the One Two Point