fn on_start(&mut self, data: StateData<'_, GameData<'_, '_>>) {
        let world = data.world;

        // Get the screen dimensions so we can initialize the camera and
        // place our sprites correctly later. We'll clone this since we'll
        // pass the world mutably to the following functions.
        let dimensions = (*world.read_resource::<ScreenDimensions>()).clone();

        // Load our sprites and display them
        //let sprites = load_sprites(world);
        // init_sprites(world, &sprites, &dimensions);

        self.progress_counter = Some(asset::load_assets(world, vec![asset::AssetType::Player]));

        // Place the camera
        init_camera(world, &dimensions);
    }
// On start will run when this state is initialized. For more
// state lifecycle hooks, see:
// https://book.amethyst.rs/stable/concepts/state.html#life-cycle
On start will run when this state is initialized.
On start will run when this state is initialized .
fn on_start(&mut self, data: StateData<'_, GameData<'_, '_>>) {
        let world = data.world;
        // Get the screen dimensions so we can initialize the camera and
        // place our sprites correctly later. We'll clone this since we'll
        // pass the world mutably to the following functions.
        let dimensions = (*world.read_resource::<ScreenDimensions>()).clone();
        // Load our sprites and display them
        //let sprites = load_sprites(world);
        // init_sprites(world, &sprites, &dimensions);
        self.progress_counter = Some(asset::load_assets(world, vec![asset::AssetType::Player]));
        // Place the camera
        init_camera(world, &dimensions);
    }
fn on_start ( & mut self , data : StateData < ' _ , GameData < ' _ , ' _ > > ) { let world = data . world ; // Get the screen dimensions so we can initialize the camera and // place our sprites correctly later. We'll clone this since we'll // pass the world mutably to the following functions. let dimensions = ( * world . read_resource :: < ScreenDimensions > ( ) ) . clone ( ) ; // Load our sprites and display them //let sprites = load_sprites(world); // init_sprites(world, &sprites, &dimensions); self . progress_counter = Some ( asset :: load_assets ( world , vec ! [ asset AssetType Player ] ) ) ; // Place the camera init_camera ( world , & dimensions ) ; }
On start will run when this state is initialized.
On start will run when this state is initialized .
&mut self
data
StateData<'_, GameData<'_, '_>>