fn draw(&self, pxs: &PixelScreen) {
        let frames = &[
            &[(0, 0), (2, 0), (1, 1), (0, 2), (2, 2)][..],
            &[(1, 0), (0, 1), (2, 1), (1, 2)][..],
        ];

        let selected = frames[self.progress as usize % 2];

        for px in selected {
            pxs.draw_rect(
                Pos::new(
                    (self.pos_x + px.0) as f64 * 10.0,
                    (self.pos_y + px.1) as f64 * 10.0,
                ),
                10.0,
                10.0,
            );
        }
    }
/// Render the animation of the explosion to the **PixelScreen**.
///
/// This has two repeating animation steps, which depend on the **progress** field in the entity.
Render the animation of the explosion to the **PixelScreen**.
This has two repeating animation steps, which depend on the **progress** field in the entity.
Render the animation of the explosion to the ** PixelScreen ** . This has two repeating animation steps which depend on the ** progress ** field in the entity .
fn draw(&self, pxs: &PixelScreen) {
        let frames = &[
            &[(0, 0), (2, 0), (1, 1), (0, 2), (2, 2)][..],
            &[(1, 0), (0, 1), (2, 1), (1, 2)][..],
        ];
        let selected = frames[self.progress as usize % 2];
        for px in selected {
            pxs.draw_rect(
                Pos::new(
                    (self.pos_x + px.0) as f64 * 10.0,
                    (self.pos_y + px.1) as f64 * 10.0,
                ),
                10.0,
                10.0,
            );
        }
    }
fn draw ( & self , pxs : & PixelScreen ) { let frames = & [ & [ ( 0 , 0 ) , ( 2 , 0 ) , ( 1 , 1 ) , ( 0 , 2 ) , ( 2 , 2 ) ] [ .. ] , & [ ( 1 , 0 ) , ( 0 , 1 ) , ( 2 , 1 ) , ( 1 , 2 ) ] [ .. ] , ] ; let selected = frames [ self . progress as usize % 2 ] ; for px in selected { pxs . draw_rect ( Pos :: new ( ( self . pos_x + px . 0 ) as f64 * 10.0 , ( self . pos_y + px . 1 ) as f64 * 10.0 , ) , 10.0 , 10.0 , ) ; } }
Render the animation of the explosion to the **PixelScreen**.
Render the animation of the explosion to the ** PixelScreen ** .
&self
pxs
&PixelScreen
&self
pxs
&PixelScreen