(player)
| 60 | |
| 61 | var rotate = 0; |
| 62 | function Spark(player) { |
| 63 | rotate = (rotate + 7) % 360; |
| 64 | this.colorName = player.colorName; |
| 65 | this.color = colors[player.colorName][Math.floor(Math.random()*3)]; |
| 66 | this.x = player.x; |
| 67 | this.y = player.y; |
| 68 | this.r = rotate / 180 * Math.PI; |
| 69 | this.d = 10; |
| 70 | sparks.push(this); |
| 71 | } |
| 72 | Spark.prototype.tick = function (delta) { |
| 73 | this.d += delta * 0.1 + this.d / 10; |
| 74 | for (var a = 0; a < Math.PI * 2; a += Math.PI / 3) { |
nothing calls this directly
no outgoing calls
no test coverage detected