use crate::{debug, game_setup, util}; use bevy::prelude::*; pub mod grid; pub mod prefab; mod systems; pub mod tetris; pub const PIXEL_SCALE: f32 = 3.0; pub fn init(app: &mut App) { let app = app.add_plugins(( game_setup::GameSetupPlugin, util::UtilPlugin, debug::DebugPlugin, )); app.add_event::() .register_type::() .register_type::() .register_type::() .register_type::() .register_type::() .register_type::() .register_type::() .register_type::() .register_type::() .add_systems(Startup, systems::setup_game_scene) .add_systems(PreUpdate, (systems::block_control, systems::apply_gravity)) .add_systems(Update, (systems::demo_2d, systems::apply_piece_movement)) .add_systems(PostUpdate, systems::grid_positioning); }