/* The update component calls update signals to all listening entities. */ re.c('update') .statics({ l:[], update:function(t){ var l = this.l; for(var k=0, b; k me){ //swap var t = l[him]; l[him] = l[me]; l[me] = t; } return this; }, updateBefore:function(e){ var him = l.indexOf(e); var me = l.indexOf(this); if(him < me){ //swap var t = l[him]; l[him] = l[me]; l[me] = t; } return this; } }; }()) .init(function(){ re.update.l.push(this); }) .dispose(function(){ re.update.l.splice(re.update.l.indexOf(this), 1); });