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

        self.pso.bind(pxs);

        for e in px_list {
            pxs.draw_rect(
                Pos::new((self.pos + e.0) as f64 * 10.0, (57 + e.1) as f64 * 10.0),
                10.0,
                10.0,
            );
        }
    }
/// Draw the player to the screen using its pixel list.
/// This time bind the PSO in the draw call, because we do not batch multiple players.
Draw the player to the screen using its pixel list.
This time bind the PSO in the draw call, because we do not batch multiple players.
Draw the player to the screen using its pixel list . This time bind the PSO in the draw call because we do not batch multiple players .
fn draw(&self, pxs: &PixelScreen) {
        let px_list = &[(1, 0), (0, 1), (1, 1), (2, 1), (0, 2), (2, 2)];
        self.pso.bind(pxs);
        for e in px_list {
            pxs.draw_rect(
                Pos::new((self.pos + e.0) as f64 * 10.0, (57 + e.1) as f64 * 10.0),
                10.0,
                10.0,
            );
        }
    }
fn draw ( & self , pxs : & PixelScreen ) { let px_list = & [ ( 1 , 0 ) , ( 0 , 1 ) , ( 1 , 1 ) , ( 2 , 1 ) , ( 0 , 2 ) , ( 2 , 2 ) ] ; self . pso . bind ( pxs ) ; for e in px_list { pxs . draw_rect ( Pos :: new ( ( self . pos + e . 0 ) as f64 * 10.0 , ( 57 + e . 1 ) as f64 * 10.0 ) , 10.0 , 10.0 , ) ; } }
Draw the player to the screen using its pixel list.
Draw the player to the screen using its pixel list .
&self
pxs
&PixelScreen
&self
pxs
&PixelScreen