INNER CODE UNIT · Rust

spawn_level

rust-gamedev/rust-game-ports · rusty_roguelike-bevy/src/spawner/mod.rs:22

pub fn spawn_level(
    ecs: &mut World,
    rng: &mut RandomNumberGenerator,
    level: usize,
    spawn_points: &[Point],
) {
    let template = Templates::load();
    template.spawn_entities(ecs, rng, level, spawn_points);
}

pub fn spawn_amulet_of_yala(world: &mut World, pos: Point) {
    world.spawn().insert_bundle((
        Item,
        AmuletOfYala,
        PointC(pos),
        Render {
            color: ColorPair::new(WHITE, BLACK),
            glyph: to_cp437('|'),

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…