-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bevy -> 0.14.1, buggy faster projectiles
- Loading branch information
1 parent
319c107
commit dec7b4c
Showing
13 changed files
with
2,096 additions
and
506 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
[toolchain] | ||
channel = "nightly" | ||
# channel = "nightly" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,34 @@ | ||
use std::time::Duration; | ||
|
||
use bevy::{app::{App, Plugin, Update}, prelude::*, time::common_conditions::on_timer}; | ||
use bevy::{ | ||
app::{App, Plugin, Update}, | ||
prelude::*, | ||
time::common_conditions::on_timer, | ||
}; | ||
|
||
use crate::{components::ProjectileMoveEndEvent, constants}; | ||
|
||
use super::{laser::{kill_lasers, update_lasers}, resource_blob::{kill_resource_blobs, update_resource_blobs}, unit::{update_units}}; | ||
use super::{ | ||
laser::{kill_lasers, update_lasers}, | ||
resource_blob::{kill_resource_blobs, update_resource_blobs}, | ||
unit::update_units, | ||
}; | ||
|
||
pub struct ProjectilePlugin; | ||
|
||
impl Plugin for ProjectilePlugin { | ||
fn build(&self, app: &mut App) { | ||
app.add_systems(Update, (update_lasers, update_units, (kill_lasers, kill_resource_blobs).run_if(on_timer(Duration::from_secs_f32( | ||
constants::SECONDS_PER_TICK, | ||
)))))/* .add_systems(Update, (update_resource_blobs).run_if(ProjectileMoveEndEvent)) */; | ||
app.add_systems( | ||
Update, | ||
( | ||
update_lasers, | ||
update_units, | ||
update_resource_blobs, | ||
), | ||
) | ||
.add_systems( | ||
Update, | ||
(kill_lasers, kill_resource_blobs).run_if(on_event::<ProjectileMoveEndEvent>()), | ||
); | ||
} | ||
} | ||
} |
Oops, something went wrong.