~starkingdoms/starkingdoms

ref: e54fae7165cfad2269e971159960a03285d9d25a starkingdoms/crates/client/src/rendering/assets_native.rs -rw-r--r-- 299 bytes
e54fae71 — ghostly_zsh client networking probably working 10 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use bevy_ecs::system::Resource;

#[derive(Resource)]
pub struct Assets {

}
impl Assets {
    pub fn new() -> Self {
        Assets {  }
    }
    pub fn get(&self, local_path: impl Into<String>) -> Option<Vec<u8>> {
        std::fs::read(format!("src/textures/{}", local_path.into())).ok()
    }
}