INNER CODE UNIT · Rust
new
CleanCut/rusty_engine · src/game.rs:278
pub fn new() -> Self {
if std::fs::read_dir("assets").is_err() {
println!(
"FATAL: Could not find assets directory. Have you downloaded the assets?\nhttps://github.com/CleanCut/rusty_engine#you-must-download-the-assets-separately"
);
std::process::exit(1);
}
Default::default()
}
/// Use this to set properties of the native OS window before running the game. See the
/// [window](https://github.com/CleanCut/rusty_engine/blob/main/examples/window.rs) example for
/// more information.
pub fn window_settings(&mut self, window: Window) -> &mut Self {
self.window = window;
self
}