main.rs 488 Bytes
Newer Older
1
2
use wasm_bindgen::prelude::*;

Rahix's avatar
Rahix committed
3
pub mod angel_shifts;
4
pub mod colliders;
5
pub mod colors;
6
pub mod components;
Rahix's avatar
Rahix committed
7
pub mod entities;
Rahix's avatar
Rahix committed
8
pub mod gamestate;
9
pub mod resources;
Simon Goller's avatar
Simon Goller committed
10
pub mod sprites;
11
pub mod states;
12
pub mod svg_loader;
13
14
pub mod systems;
pub mod utils;
15

16
#[wasm_bindgen]
Rahix's avatar
Rahix committed
17
pub fn start() -> Result<(), JsValue> {
Rahix's avatar
Rahix committed
18
    std::panic::set_hook(Box::new(console_error_panic_hook::hook));
19
    utils::update_version_info();
Rahix's avatar
Rahix committed
20
    gamestate::StateMachine::launch(states::MainMenuState::new());
Simon Goller's avatar
Simon Goller committed
21
    Ok(())
22
}