/** * It's a thing! */ var creature = { dna: {}, cellInstances: [], start: function() { }, initCells() { for(var i = 0; i < this.dna.length; i++) { var newCell = GameObject.create(cell, this.transform.position.x + (this.dna[i].pos.x * 32), this.transform.position.y + (this.dna[i].pos.y * 32), s_orb, 500); newCell.setType(this.dna[i].type); this.cellInstances.push(newCell); } }, update: function(deltaTime) { }, onDestroy: function() { }, onCollision: function(other) { } }