public void update() { for (int i = 0; i < this.nRows * this.nCols; ++i) { GameObject obj = this.currentLayout[i]; if (obj != null && obj.isAnimating()) { this.updateAnimations(obj, i); break; } } }