20 lines
482 B
Rust
20 lines
482 B
Rust
use crate::states::*;
|
|
use bevy::prelude::*;
|
|
|
|
pub struct GameScreenPlugin;
|
|
|
|
impl Plugin for GameScreenPlugin {
|
|
fn build(&self, app: &mut App) {
|
|
app.add_systems(OnEnter(AppState::GameScreen), setup);
|
|
app.add_systems(OnExit(AppState::GameScreen), cleanup);
|
|
}
|
|
}
|
|
|
|
fn setup(mut commands: Commands) {
|
|
commands.insert_resource(ClearColor(Color::srgb(0.294, 0.412, 0.184)));
|
|
}
|
|
|
|
fn cleanup(mut commands: Commands) {
|
|
commands.remove_resource::<ClearColor>();
|
|
}
|