(amount, speed = 1, model, texture, lifetime)
| 191 | } |
| 192 | |
| 193 | _spawn_particles(amount, speed = 1, model, texture, lifetime) { |
| 194 | for (let i = 0; i < amount; i++) { |
| 195 | let particle = game_spawn(entity_particle_t, this.p); |
| 196 | particle._model = model; |
| 197 | particle._texture = texture; |
| 198 | particle._die_at = game_time + lifetime + Math.random() * lifetime * 0.2; |
| 199 | particle.v = vec3( |
| 200 | (Math.random() - 0.5) * speed, |
| 201 | Math.random() * speed, |
| 202 | (Math.random() - 0.5) * speed |
| 203 | ); |
| 204 | } |
| 205 | } |
| 206 | |
| 207 | _receive_damage(from, amount) { |
| 208 | if (this._dead) { |
no outgoing calls
no test coverage detected