import { UIAssetsLoaderInfoPipe } from "../UIPipes/UIPipes";
import { loadPixelAsset } from "../Utils/Assets.utils";

export async function loadGameAssets()
{
    UIAssetsLoaderInfoPipe.update((s)=>{
        s.totalToDownload = 6;
        s.downloaded = 0;
    });
    // await loadPixelAsset("assets/images/amogus.png");
    // UIAssetsLoaderInfoPipe.update((s)=>{
    //     s.downloaded += 1;
    // });
    // await loadPixelAsset("assets/images/amogus_gb.png");
    // UIAssetsLoaderInfoPipe.update((s)=>{
    //     s.downloaded += 1;
    // });
    // await loadPixelAsset("assets/images/amogus_g.png");
    // UIAssetsLoaderInfoPipe.update((s)=>{
    //     s.downloaded += 1;
    // });
    // await loadPixelAsset("assets/images/amogus_b.png");
    // UIAssetsLoaderInfoPipe.update((s)=>{
    //     s.downloaded += 1;
    // });
    // await loadPixelAsset("assets/images/amogus_p.png");
    // UIAssetsLoaderInfoPipe.update((s)=>{
    //     s.downloaded += 1;
    // });
    await loadPixelAsset("assets/images/world/vegetation_ts.png");
    UIAssetsLoaderInfoPipe.update((s)=>{
        s.downloaded += 1;
    });
    await loadPixelAsset("assets/images/characters/char0.png");
    UIAssetsLoaderInfoPipe.update((s)=>{
        s.downloaded += 1;
    });
    await loadPixelAsset("assets/images/buildings/buildings.png");
    UIAssetsLoaderInfoPipe.update((s)=>{
        s.downloaded += 1;
    });
    await loadPixelAsset("assets/images/world/world_terrain_atlas.png");
    UIAssetsLoaderInfoPipe.update((s)=>{
        s.downloaded += 1;
    });
    await loadPixelAsset("assets/images/world/world_terrain_atlas_overlay.png");
    UIAssetsLoaderInfoPipe.update((s)=>{
        s.downloaded += 1;
    });
    await loadPixelAsset("assets/images/selection.png");
    UIAssetsLoaderInfoPipe.update((s)=>{
        s.downloaded += 1;
        s.finished = false;
    });
}