Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8474121037 |
@@ -1,11 +1,8 @@
|
|||||||
use bevy::{
|
use bevy::{
|
||||||
app::ScheduleRunnerPlugin,
|
app::ScheduleRunnerPlugin,
|
||||||
asset::{AssetMode, AssetPlugin, processor::AssetProcessor, processor::ProcessorState},
|
asset::{AssetMode, AssetPlugin, processor::AssetProcessor, processor::ProcessorState},
|
||||||
gltf::GltfPlugin,
|
|
||||||
image::{CompressedImageFormats, ImageLoader, ImagePlugin},
|
|
||||||
prelude::*,
|
prelude::*,
|
||||||
tasks::block_on,
|
tasks::block_on,
|
||||||
text::TextPlugin,
|
|
||||||
};
|
};
|
||||||
use shinespark::AssetProcessingPlugin;
|
use shinespark::AssetProcessingPlugin;
|
||||||
use std::{process::ExitCode, time::Duration};
|
use std::{process::ExitCode, time::Duration};
|
||||||
@@ -18,8 +15,6 @@ fn main() -> ExitCode {
|
|||||||
use_asset_processor_override: Some(true),
|
use_asset_processor_override: Some(true),
|
||||||
..default()
|
..default()
|
||||||
})
|
})
|
||||||
.add_plugins((ImagePlugin::default(), TextPlugin, GltfPlugin::default()))
|
|
||||||
.register_asset_loader(ImageLoader::new(CompressedImageFormats::NONE))
|
|
||||||
.add_plugins(AssetProcessingPlugin)
|
.add_plugins(AssetProcessingPlugin)
|
||||||
.add_systems(Update, finish_when_processed);
|
.add_systems(Update, finish_when_processed);
|
||||||
|
|
||||||
|
|||||||
+6
-25
@@ -32,13 +32,7 @@ use clap::Parser;
|
|||||||
use ron_asset_manager::RonAssetPlugin;
|
use ron_asset_manager::RonAssetPlugin;
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
camera::MatchCameraPlugin,
|
camera::MatchCameraPlugin, fighter::manifest::FighterManifest, game_settings::GameSettings, schedule::GameplaySchedulePlugin, stage::manifest::StageManifest, ui::InGameUIPlugin,
|
||||||
fighter::manifest::FighterManifest,
|
|
||||||
game_settings::GameSettings,
|
|
||||||
menus::style::FGUiStyle,
|
|
||||||
schedule::GameplaySchedulePlugin,
|
|
||||||
stage::manifest::StageManifest,
|
|
||||||
ui::InGameUIPlugin,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
mod args;
|
mod args;
|
||||||
@@ -86,20 +80,6 @@ pub enum AppState {
|
|||||||
#[derive(Default)]
|
#[derive(Default)]
|
||||||
pub struct GamePlugin;
|
pub struct GamePlugin;
|
||||||
|
|
||||||
/// Registers every custom asset loader used by the game and asset processor.
|
|
||||||
pub struct GameAssetPlugin;
|
|
||||||
|
|
||||||
impl Plugin for GameAssetPlugin {
|
|
||||||
fn build(&self, app: &mut App) {
|
|
||||||
app.add_plugins((
|
|
||||||
RonAssetPlugin::<FighterManifest>::create("fighter.ron"),
|
|
||||||
RonAssetPlugin::<StageManifest>::create("stage.ron"),
|
|
||||||
RonAssetPlugin::<GameSettings>::create("ron"),
|
|
||||||
RonAssetPlugin::<FGUiStyle>::create("stylesheet.ron"),
|
|
||||||
));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl Plugin for GamePlugin {
|
impl Plugin for GamePlugin {
|
||||||
fn build(&self, app: &mut App) {
|
fn build(&self, app: &mut App) {
|
||||||
// Each module owns its own systems, rollback registrations and
|
// Each module owns its own systems, rollback registrations and
|
||||||
@@ -119,7 +99,9 @@ impl Plugin for GamePlugin {
|
|||||||
scripting::importer::FighterScriptImportPlugin,
|
scripting::importer::FighterScriptImportPlugin,
|
||||||
stage::StagePlugin,
|
stage::StagePlugin,
|
||||||
MatchCameraPlugin,
|
MatchCameraPlugin,
|
||||||
GameAssetPlugin,
|
RonAssetPlugin::<FighterManifest>::create("fighter.ron"),
|
||||||
|
RonAssetPlugin::<StageManifest>::create("stage.ron"),
|
||||||
|
RonAssetPlugin::<GameSettings>::create("ron"),
|
||||||
InGameUIPlugin,
|
InGameUIPlugin,
|
||||||
))
|
))
|
||||||
.add_plugins(menus::MenuPlugin)
|
.add_plugins(menus::MenuPlugin)
|
||||||
@@ -173,14 +155,13 @@ impl Plugin for GamePlugin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Registers the custom asset loaders and processors used by CI and release
|
/// Registers only the custom asset processors used by CI and release builds.
|
||||||
/// builds. The processing binary adds this plugin without starting the game.
|
/// The processing binary adds this plugin without starting the game.
|
||||||
pub struct AssetProcessingPlugin;
|
pub struct AssetProcessingPlugin;
|
||||||
|
|
||||||
impl Plugin for AssetProcessingPlugin {
|
impl Plugin for AssetProcessingPlugin {
|
||||||
fn build(&self, app: &mut App) {
|
fn build(&self, app: &mut App) {
|
||||||
app.add_plugins((
|
app.add_plugins((
|
||||||
GameAssetPlugin,
|
|
||||||
scripting::importer::FighterScriptImportPlugin,
|
scripting::importer::FighterScriptImportPlugin,
|
||||||
fighter::baked_animation::BakedAnimationAssetProcessingPlugin,
|
fighter::baked_animation::BakedAnimationAssetProcessingPlugin,
|
||||||
));
|
));
|
||||||
|
|||||||
+4
-1
@@ -6,10 +6,12 @@ use bevy::{
|
|||||||
prelude::*,
|
prelude::*,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
use ron_asset_manager::RonAssetPlugin;
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
AppState,
|
AppState,
|
||||||
game_settings::CommonAssets,
|
game_settings::CommonAssets,
|
||||||
menus::{character_select::CharacterSelectScreen, main_menu::MainMenu},
|
menus::{character_select::CharacterSelectScreen, main_menu::MainMenu, style::FGUiStyle},
|
||||||
};
|
};
|
||||||
pub mod button;
|
pub mod button;
|
||||||
pub mod character_select;
|
pub mod character_select;
|
||||||
@@ -220,6 +222,7 @@ impl Plugin for MenuPlugin {
|
|||||||
//---------
|
//---------
|
||||||
// STAGE SELECT END
|
// STAGE SELECT END
|
||||||
//---------
|
//---------
|
||||||
|
.add_plugins(RonAssetPlugin::<FGUiStyle>::create("stylesheet.ron"))
|
||||||
.add_systems(
|
.add_systems(
|
||||||
Update,
|
Update,
|
||||||
(
|
(
|
||||||
|
|||||||
Reference in New Issue
Block a user