@@ -224,19 +224,20 @@ MovingSprite::after_editor_set()
224
224
void
225
225
MovingSprite::spawn_explosion_sprites (int count, const std::string& sprite_path)
226
226
{
227
- for (int i = 0 ; i < count; i++) {
228
- Vector ppos = m_col.m_bbox .get_middle ();
229
- float angle = graphicsRandom.randf (-math::PI_2, math::PI_2);
230
- float velocity = graphicsRandom.randf (350 , 400 );
231
- float vx = sinf (angle)*velocity;
232
- float vy = -cosf (angle)*velocity;
233
- Vector pspeed = Vector (vx, vy);
234
- Vector paccel = Vector (0 , Sector::get ().get_gravity ()*10 );
235
- Sector::get ().add <SpriteParticle>(sprite_path,
236
- " default" ,
237
- ppos, ANCHOR_MIDDLE,
238
- pspeed, paccel,
239
- LAYER_OBJECTS-1 );
227
+ for (int i = 0 ; i < count; i++)
228
+ {
229
+ Vector ppos = m_col.m_bbox .get_middle ();
230
+ float angle = graphicsRandom.randf (-math::PI_2, math::PI_2);
231
+ float velocity = graphicsRandom.randf (350 , 400 );
232
+ float vx = sinf (angle)*velocity;
233
+ float vy = -cosf (angle)*velocity;
234
+ Vector pspeed = Vector (vx, vy);
235
+ Vector paccel = Vector (0 , Sector::get ().get_gravity ()*10 );
236
+ Sector::get ().add <SpriteParticle>(sprite_path,
237
+ " default" ,
238
+ ppos, ANCHOR_MIDDLE,
239
+ pspeed, paccel,
240
+ LAYER_OBJECTS-1 );
240
241
}
241
242
}
242
243
0 commit comments