Compare commits
No commits in common. "bevy-0.11" and "master" have entirely different histories.
5 changed files with 957 additions and 1391 deletions
2314
Cargo.lock
generated
2314
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
17
Cargo.toml
17
Cargo.toml
|
@ -6,21 +6,21 @@ license = "AGPL-3.0-only"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
bevy = { version = "0.11.0", default-features = false, features = ["bevy_asset", "bevy_audio", "bevy_gilrs", "bevy_winit", "png", "vorbis", "x11"] }
|
bevy = { version = "0.8.1", default-features = false, features = ["bevy_asset", "bevy_audio", "bevy_gilrs", "bevy_winit", "render", "png", "vorbis", "x11"] }
|
||||||
bevy_common_assets = { version = "0.7.0", features = ["json"] }
|
bevy_common_assets = { version = "0.3.0", features = ["json"] }
|
||||||
bevy_rapier2d = "0.22.0"
|
bevy_rapier2d = "0.16.2"
|
||||||
#crossbeam-channel = "0.5.6"
|
#crossbeam-channel = "0.5.6"
|
||||||
rand = "0.8.5"
|
rand = "0.8.5"
|
||||||
rand_distr = "0.4.3"
|
rand_distr = "0.4.3"
|
||||||
rapier2d = "0.17.2"
|
rapier2d = "0.14.0"
|
||||||
serde = { version = "1.0.180", features = ["derive"] }
|
serde = { version = "1.0.144", features = ["derive"] }
|
||||||
|
|
||||||
[target."cfg(not(target_arch = \"wasm32\"))".dependencies]
|
[target."cfg(not(target_arch = \"wasm32\"))".dependencies]
|
||||||
#bevy-inspector-egui = "0.12.1"
|
#bevy-inspector-egui = "0.12.1"
|
||||||
bevy_mod_picking = "0.14.0"
|
bevy_mod_picking = "0.9.0"
|
||||||
# cpal = "0.14.0"
|
# cpal = "0.14.0"
|
||||||
# hexodsp = { git = "https://github.com/WeirdConstructor/HexoDSP", default-features = false }
|
# hexodsp = { git = "https://github.com/WeirdConstructor/HexoDSP", default-features = false }
|
||||||
serde_json = "1.0.104"
|
serde_json = "1.0.85"
|
||||||
#ticktock = "0.8.0"
|
#ticktock = "0.8.0"
|
||||||
|
|
||||||
[target."cfg(target_arch = \"wasm32\")".dependencies]
|
[target."cfg(target_arch = \"wasm32\")".dependencies]
|
||||||
|
@ -30,5 +30,4 @@ serde_json = "1.0.104"
|
||||||
opt-level = 3
|
opt-level = 3
|
||||||
|
|
||||||
[patch.crates-io]
|
[patch.crates-io]
|
||||||
#wgpu = { git = "https://github.com/mockersf/wgpu/", branch = "unconditional-clear-workaround" }
|
wgpu = { git = "https://github.com/mockersf/wgpu/", branch = "unconditional-clear-workaround" }
|
||||||
bevy_mod_picking = { git = "https://github.com/bardt/bevy_mod_picking/", branch = "bevy_0.11" }
|
|
||||||
|
|
|
@ -35,6 +35,7 @@ impl PassThroughFilter {
|
||||||
|
|
||||||
#[derive(Bundle)]
|
#[derive(Bundle)]
|
||||||
pub struct AbsorbingFilter {
|
pub struct AbsorbingFilter {
|
||||||
|
#[bundle]
|
||||||
pub mesh: ColorMesh2dBundle,
|
pub mesh: ColorMesh2dBundle,
|
||||||
pub collider: Collider,
|
pub collider: Collider,
|
||||||
pub sensor: Sensor,
|
pub sensor: Sensor,
|
||||||
|
@ -69,6 +70,7 @@ pub fn spawn_absorbing_filter(
|
||||||
|
|
||||||
#[derive(Bundle)]
|
#[derive(Bundle)]
|
||||||
pub struct RotatingFilter {
|
pub struct RotatingFilter {
|
||||||
|
#[bundle]
|
||||||
pub sprite: SpriteBundle,
|
pub sprite: SpriteBundle,
|
||||||
pub collider: Collider,
|
pub collider: Collider,
|
||||||
pub sensor: Sensor,
|
pub sensor: Sensor,
|
||||||
|
|
|
@ -64,10 +64,9 @@ impl Plugin for GamePlugin {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Events
|
// Events
|
||||||
#[derive(Event)]
|
|
||||||
pub struct LevelStartupEvent;
|
pub struct LevelStartupEvent;
|
||||||
|
|
||||||
#[derive(Event)]
|
|
||||||
pub struct ChangeCharacterEvent;
|
pub struct ChangeCharacterEvent;
|
||||||
|
|
||||||
// Resources
|
// Resources
|
||||||
|
|
12
src/main.rs
12
src/main.rs
|
@ -18,9 +18,8 @@ use bevy::{
|
||||||
use bevy_common_assets::json::JsonAssetPlugin;
|
use bevy_common_assets::json::JsonAssetPlugin;
|
||||||
use bevy_rapier2d::prelude::*;
|
use bevy_rapier2d::prelude::*;
|
||||||
|
|
||||||
#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq, States)]
|
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
|
||||||
enum AppState {
|
enum AppState {
|
||||||
#[default]
|
|
||||||
Loading,
|
Loading,
|
||||||
Menu,
|
Menu,
|
||||||
Game,
|
Game,
|
||||||
|
@ -52,9 +51,10 @@ fn main() {
|
||||||
let (first_level, use_editor) = (game::LevelId(0), false);
|
let (first_level, use_editor) = (game::LevelId(0), false);
|
||||||
|
|
||||||
let mut app = App::new();
|
let mut app = App::new();
|
||||||
app.insert_resource(Default::default())
|
app.insert_resource(Msaa { samples: 4 })
|
||||||
.insert_resource(Window {
|
.insert_resource(WindowDescriptor {
|
||||||
resolution: (640., 480.).into(),
|
width: 640.0,
|
||||||
|
height: 480.0,
|
||||||
resize_constraints: WindowResizeConstraints {
|
resize_constraints: WindowResizeConstraints {
|
||||||
min_width: 256.,
|
min_width: 256.,
|
||||||
min_height: 256.,
|
min_height: 256.,
|
||||||
|
@ -66,7 +66,7 @@ fn main() {
|
||||||
..Default::default()
|
..Default::default()
|
||||||
})
|
})
|
||||||
.insert_resource(UseEditor(use_editor))
|
.insert_resource(UseEditor(use_editor))
|
||||||
.add_state::<AppState>()
|
.add_state(AppState::Loading)
|
||||||
.insert_resource(game::FirstLevel(first_level))
|
.insert_resource(game::FirstLevel(first_level))
|
||||||
.insert_resource(ClearColor(Color::BLACK))
|
.insert_resource(ClearColor(Color::BLACK))
|
||||||
.add_plugins(DefaultPlugins)
|
.add_plugins(DefaultPlugins)
|
||||||
|
|
Loading…
Reference in a new issue