blue-star / cellular-evolution
creature.js
| 1 | /** |
| 2 | * It's a thing! |
| 3 | */ |
| 4 | |
| 5 | var creature = |
| 6 | { |
| 7 | dna: {}, |
| 8 | cellInstances: [], |
| 9 | |
| 10 | start: function() |
| 11 | { |
| 12 | |
| 13 | }, |
| 14 | |
| 15 | initCells() |
| 16 | { |
| 17 | for(var i = 0; i < this.dna.length; i++) |
| 18 | { |
| 19 | 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); |
| 20 | |
| 21 | newCell.setType(this.dna[i].type); |
| 22 | |
| 23 | this.cellInstances.push(newCell); |
| 24 | } |
| 25 | }, |
| 26 | |
| 27 | update: function(deltaTime) |
| 28 | { |
| 29 | |
| 30 | }, |
| 31 | |
| 32 | onDestroy: function() |
| 33 | { |
| 34 | |
| 35 | }, |
| 36 | |
| 37 | onCollision: function(other) |
| 38 | { |
| 39 | |
| 40 | } |
| 41 | } |