Skip to content
This repository was archived by the owner on Nov 14, 2023. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion src/Foundation/Actor.js
Original file line number Diff line number Diff line change
Expand Up @@ -1461,15 +1461,26 @@ CAAT.Module({
* If the Behavior is not present at the actor behavior collection nothing happends.
*
* @param behavior {CAAT.Behavior.BaseBehavior}
* @deprecated
*/
removeBehaviour:function (behavior) {
this.removeBehavior(behavior);
},
/**
* Remove a Behavior from the Actor.
* If the Behavior is not present at the actor behavior collection nothing happends.
*
* @param behavior {CAAT.Behavior.BaseBehavior}
*/
removeBehavior:function (behavior) {
var c = this.behaviorList;
var n = c.length - 1;
while (n) {
while (n >= 0) {
if (c[n] === behavior) {
c.splice(n, 1);
return this;
}
n = n - 1;
}
return this;
},
Expand Down