diff --git a/src/model/actor.js b/src/model/actor.js index 0e6055e4..7bb10098 100644 --- a/src/model/actor.js +++ b/src/model/actor.js @@ -587,6 +587,9 @@ this.dirty= true; return this; }, + flipX : function() { + this.setScale(-this.scaleX,this.scaleY); + }, getAnchorPercent : function( anchor ) { var anchors=[ @@ -761,6 +764,16 @@ return this; }, + setFullBounds : function(director) { + this.x = 0; + this.y = 0; + this.width = director.width; + this.height = director.height; + + this.dirty = true; + + return this; + }, /** * This method sets the position of an Actor inside its parent. * @@ -1139,6 +1152,16 @@ return this; }, + disableDrag : function() { + + this.mouseEnter= function(mouseEvent) {}; + this.mouseExit = function(mouseEvent) {}; + this.mouseMove = function(mouseEvent) {}; + this.mouseUp = function(mouseEvent) {}; + this.mouseDrag = function(mouseEvent) {}; + + return this; + }, /** * Default mouseClick handler. * Mouse click events are received after a call to mouseUp method if no dragging was in progress. @@ -2355,6 +2378,9 @@ getNumActiveChildren : function() { return this.activeChildren.length; }, + shuffleChildrens : function() { + this.childrenList.sort(function() { return Math.round(Math.random())-0.5; }); + }, /** * Returns the Actor at the iPosition(th) position. * @param iPosition an integer indicating the position array. @@ -2393,6 +2419,12 @@ cl.splice( index, 0, nActor[0] ); } } + }, + setRandomZOrder : function() { + var cl = this.childrenList; + for(var i=0;i