Compare commits
1 commit
Author | SHA1 | Date | |
---|---|---|---|
7e2bdd5203 |
5 changed files with 1404 additions and 970 deletions
2340
Cargo.lock
generated
2340
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"
|
||||
|
||||
[dependencies]
|
||||
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.3.0", features = ["json"] }
|
||||
bevy_rapier2d = "0.16.2"
|
||||
bevy = { version = "0.11.0", default-features = false, features = ["bevy_asset", "bevy_audio", "bevy_gilrs", "bevy_winit", "png", "vorbis", "x11"] }
|
||||
bevy_common_assets = { version = "0.7.0", features = ["json"] }
|
||||
bevy_rapier2d = "0.22.0"
|
||||
#crossbeam-channel = "0.5.6"
|
||||
rand = "0.8.5"
|
||||
rand_distr = "0.4.3"
|
||||
rapier2d = "0.14.0"
|
||||
serde = { version = "1.0.144", features = ["derive"] }
|
||||
rapier2d = "0.17.2"
|
||||
serde = { version = "1.0.180", features = ["derive"] }
|
||||
|
||||
[target."cfg(not(target_arch = \"wasm32\"))".dependencies]
|
||||
#bevy-inspector-egui = "0.12.1"
|
||||
bevy_mod_picking = "0.9.0"
|
||||
bevy_mod_picking = "0.14.0"
|
||||
# cpal = "0.14.0"
|
||||
# hexodsp = { git = "https://github.com/WeirdConstructor/HexoDSP", default-features = false }
|
||||
serde_json = "1.0.85"
|
||||
serde_json = "1.0.104"
|
||||
#ticktock = "0.8.0"
|
||||
|
||||
[target."cfg(target_arch = \"wasm32\")".dependencies]
|
||||
|
@ -30,4 +30,5 @@ serde_json = "1.0.85"
|
|||
opt-level = 3
|
||||
|
||||
[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,7 +35,6 @@ impl PassThroughFilter {
|
|||
|
||||
#[derive(Bundle)]
|
||||
pub struct AbsorbingFilter {
|
||||
#[bundle]
|
||||
pub mesh: ColorMesh2dBundle,
|
||||
pub collider: Collider,
|
||||
pub sensor: Sensor,
|
||||
|
@ -70,7 +69,6 @@ pub fn spawn_absorbing_filter(
|
|||
|
||||
#[derive(Bundle)]
|
||||
pub struct RotatingFilter {
|
||||
#[bundle]
|
||||
pub sprite: SpriteBundle,
|
||||
pub collider: Collider,
|
||||
pub sensor: Sensor,
|
||||
|
|
|
@ -64,9 +64,10 @@ impl Plugin for GamePlugin {
|
|||
}
|
||||
|
||||
// Events
|
||||
|
||||
#[derive(Event)]
|
||||
pub struct LevelStartupEvent;
|
||||
|
||||
#[derive(Event)]
|
||||
pub struct ChangeCharacterEvent;
|
||||
|
||||
// Resources
|
||||
|
|
12
src/main.rs
12
src/main.rs
|
@ -18,8 +18,9 @@ use bevy::{
|
|||
use bevy_common_assets::json::JsonAssetPlugin;
|
||||
use bevy_rapier2d::prelude::*;
|
||||
|
||||
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
|
||||
#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq, States)]
|
||||
enum AppState {
|
||||
#[default]
|
||||
Loading,
|
||||
Menu,
|
||||
Game,
|
||||
|
@ -51,10 +52,9 @@ fn main() {
|
|||
let (first_level, use_editor) = (game::LevelId(0), false);
|
||||
|
||||
let mut app = App::new();
|
||||
app.insert_resource(Msaa { samples: 4 })
|
||||
.insert_resource(WindowDescriptor {
|
||||
width: 640.0,
|
||||
height: 480.0,
|
||||
app.insert_resource(Default::default())
|
||||
.insert_resource(Window {
|
||||
resolution: (640., 480.).into(),
|
||||
resize_constraints: WindowResizeConstraints {
|
||||
min_width: 256.,
|
||||
min_height: 256.,
|
||||
|
@ -66,7 +66,7 @@ fn main() {
|
|||
..Default::default()
|
||||
})
|
||||
.insert_resource(UseEditor(use_editor))
|
||||
.add_state(AppState::Loading)
|
||||
.add_state::<AppState>()
|
||||
.insert_resource(game::FirstLevel(first_level))
|
||||
.insert_resource(ClearColor(Color::BLACK))
|
||||
.add_plugins(DefaultPlugins)
|
||||
|
|
Loading…
Reference in a new issue