INNER CODE UNIT · Rust

window_settings

CleanCut/rusty_engine · src/game.rs:291

    pub fn window_settings(&mut self, window: Window) -> &mut Self {
        self.window = window;
        self
    }

    /// Start the game.
    pub fn run(&mut self, initial_game_state: S) {
        self.app.insert_resource::<S>(initial_game_state);
        self.app
            // TODO: Remove this to use the new, darker default color once the videos have been remastered
            .insert_resource(ClearColor(Color::srgb(0.4, 0.4, 0.4)))
            // Built-ins
            .add_plugins(
                DefaultPlugins
                    .set(WindowPlugin {
                        primary_window: Some(self.window.clone()),
                        ..Default::default()
                    })

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…