()
| 356 | } |
| 357 | |
| 358 | kill() |
| 359 | { |
| 360 | if (this.destroyed) |
| 361 | return; |
| 362 | this.destroy(); |
| 363 | |
| 364 | // spark effects |
| 365 | const emitter = new LJS.ParticleEmitter( |
| 366 | this.pos, 0, 0, .1, 100, .5, // pos, angle, size, time, rate, cone |
| 367 | 0, // tileInfo |
| 368 | rgb(1,1,0), rgb(1,0,0), // colorStartA, colorStartB |
| 369 | rgb(1,1,0), rgb(1,0,0), // colorEndA, colorEndB |
| 370 | .2, .2, 0, .1, .1, // time, sizeStart, sizeEnd, speed, angleSpeed |
| 371 | 1, 1, .5, 3.14, .1, // damp, angleDamp, gravityScale, particleCone, fade, |
| 372 | .5, 1, 1 // randomness, collide, additive |
| 373 | ); |
| 374 | emitter.trailScale = 1; |
| 375 | emitter.restitution = .3; |
| 376 | emitter.angle = this.velocity.angle() + LJS.PI; |
| 377 | } |
| 378 | } |
no test coverage detected