why CBehavior::setEnabled() deos not work
why CBehavior::setEnabled() deos not work
Provide us more info please?
// MyComponent is a child class of Component
// Grow and Play extends CBehavior
$grow = new MyComponent;
$gBehavior = new Grow;
$pBehavior = new Play;
$grow->attachBehavior('grow',$gBehavior);
$grow->attachBehavior('play',$pBehavior);
$grow->disableBehavior('play'); //why does this step not work
$grow->run();