fix plugin shit
This commit is contained in:
@@ -1,12 +1,11 @@
|
||||
use asset_loading::ImageAssets;
|
||||
use bevy::prelude::*;
|
||||
use physics_plugin::PhysicsPlugin;
|
||||
|
||||
mod asset_loading;
|
||||
mod bevy_plugin;
|
||||
mod level_instantiation;
|
||||
mod main_menu;
|
||||
mod physics_plugin;
|
||||
mod physics;
|
||||
mod player;
|
||||
|
||||
fn main() {
|
||||
@@ -14,9 +13,9 @@ fn main() {
|
||||
.add_plugins((
|
||||
bevy_plugin::plugin,
|
||||
asset_loading::plugin,
|
||||
player::plugin,
|
||||
PhysicsPlugin,
|
||||
physics::plugin,
|
||||
level_instantiation::map_plugin,
|
||||
player::plugin,
|
||||
main_menu::plugin,
|
||||
))
|
||||
.init_state::<GameState>()
|
||||
|
||||
@@ -20,13 +20,13 @@ pub struct PreviousPhysicalTranslation(pub Vec3);
|
||||
#[derive(Debug, Component, Clone, Copy, PartialEq, Default, Deref, DerefMut)]
|
||||
pub struct AccumulatedInput(pub Vec3);
|
||||
|
||||
pub struct PhysicsPlugin;
|
||||
impl Plugin for PhysicsPlugin {
|
||||
fn build(&self, app: &mut App) {
|
||||
app.add_systems(RunFixedMainLoop, interpolate_rendered_transform.in_set(RunFixedMainLoopSystem::AfterFixedMainLoop))
|
||||
pub fn plugin(app: &mut App) {
|
||||
app.add_systems(
|
||||
RunFixedMainLoop,
|
||||
interpolate_rendered_transform.in_set(RunFixedMainLoopSystem::AfterFixedMainLoop),
|
||||
)
|
||||
.add_systems(FixedUpdate, step);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn interpolate_rendered_transform(
|
||||
fixed_time: Res<Time<Fixed>>,
|
||||
@@ -1,8 +1,6 @@
|
||||
use crate::{
|
||||
GameState,
|
||||
physics_plugin::{
|
||||
AccumulatedInput, PhysicalTranslation, PreviousPhysicalTranslation, Velocity,
|
||||
},
|
||||
physics::{AccumulatedInput, PhysicalTranslation, PreviousPhysicalTranslation, Velocity},
|
||||
};
|
||||
use bevy::{
|
||||
input::mouse::AccumulatedMouseMotion, pbr::NotShadowCaster, prelude::*,
|
||||
|
||||
Reference in New Issue
Block a user