use std::collections::HashMap;
use std::sync::atomic::{AtomicU64, Ordering};
pub struct AssetManager {
next_id: AtomicU64,
assets: HashMap<u64, Box<dyn std::any::Any + Send + Sync>>,
}
impl AssetManager {
pub fn new() -> Self {
Self::default()
}
}
impl Default for AssetManager {
fn default() -> Self {
Self {
next_id: AtomicU64::new(1),
assets: HashMap::new(),
}
}
}