MCPcopy Create free account
hub / github.com/17cupsofcoffee/rl / new

Method new

src/main.rs:26–38  ·  view source on GitHub ↗
(ctx: &mut Context)

Source from the content-addressed store, hash-verified

24
25impl GameState {
26 fn new(ctx: &mut Context) -> tetra::Result<GameState> {
27 let mut world = World::new();
28 let resources = Resources::new(&mut world, SCREEN_WIDTH, SCREEN_HEIGHT);
29
30 let font = Texture::new(ctx, "./resources/terminal.png")?;
31 let console = Console::new(font, SCREEN_WIDTH, SCREEN_HEIGHT);
32
33 Ok(GameState {
34 world,
35 resources,
36 console,
37 })
38 }
39}
40
41impl State for GameState {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected