Skip to content

Commit

Permalink
default
Browse files Browse the repository at this point in the history
  • Loading branch information
mockersf committed Nov 15, 2024
1 parent ecc5809 commit 14de224
Show file tree
Hide file tree
Showing 15 changed files with 16 additions and 17 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ use bevy_easings::EasingsPlugin;

fn main() {
App::new()
.add_plugins(EasingsPlugin::new());
.add_plugins(EasingsPlugin::default());
}
```

Expand Down
2 changes: 1 addition & 1 deletion examples/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use bevy_easings::{Ease, *};
fn main() -> Result<(), Box<dyn std::error::Error>> {
App::default()
.add_plugins(DefaultPlugins)
.add_plugins(bevy_easings::EasingsPlugin::new())
.add_plugins(bevy_easings::EasingsPlugin::default())
.add_systems(Startup, setup)
.add_systems(PostUpdate, add_easing)
.run();
Expand Down
2 changes: 1 addition & 1 deletion examples/controlled.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
App::default()
.init_resource::<EasingList>()
.add_plugins(DefaultPlugins)
.add_plugins(bevy_easings::EasingsPlugin::new())
.add_plugins(bevy_easings::EasingsPlugin::default())
.add_systems(Startup, setup)
.add_systems(Update, (update_text, handle_input))
.add_systems(FixedUpdate, check_value)
Expand Down
2 changes: 1 addition & 1 deletion examples/custom_component.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use bevy_easings::*;
fn main() -> Result<(), Box<dyn std::error::Error>> {
App::default()
.add_plugins(DefaultPlugins)
.add_plugins(bevy_easings::EasingsPlugin::new())
.add_plugins(bevy_easings::EasingsPlugin::default())
.add_systems(Startup, setup)
.add_systems(FixedUpdate, check_value)
.insert_resource(Time::<Fixed>::from_seconds(0.2))
Expand Down
2 changes: 1 addition & 1 deletion examples/menu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use rand::Rng;
fn main() -> Result<(), Box<dyn std::error::Error>> {
App::default()
.add_plugins(DefaultPlugins)
.add_plugins(bevy_easings::EasingsPlugin::new())
.add_plugins(bevy_easings::EasingsPlugin::default())
.add_systems(Startup, setup)
.add_systems(Update, (spawn_logo_points, switch_menu, update_text))
.add_systems(PostUpdate, despawn_menu)
Expand Down
2 changes: 1 addition & 1 deletion examples/pause.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use bevy_easings::Ease;
fn main() -> Result<(), Box<dyn std::error::Error>> {
App::default()
.add_plugins(DefaultPlugins)
.add_plugins(bevy_easings::EasingsPlugin::new())
.add_plugins(bevy_easings::EasingsPlugin::default())
.add_systems(Startup, setup)
.add_systems(FixedUpdate, pause)
.insert_resource(Time::<Fixed>::from_seconds(0.25))
Expand Down
2 changes: 1 addition & 1 deletion examples/react_on_end.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use rand::Rng;
fn main() -> Result<(), Box<dyn std::error::Error>> {
App::default()
.add_plugins(DefaultPlugins)
.add_plugins(bevy_easings::EasingsPlugin::new())
.add_plugins(bevy_easings::EasingsPlugin::default())
.add_systems(Startup, setup)
.add_systems(PostUpdate, add_new_easing)
.run();
Expand Down
2 changes: 1 addition & 1 deletion examples/sprite_color.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use bevy_easings::Ease;
fn main() -> Result<(), Box<dyn std::error::Error>> {
App::default()
.add_plugins(DefaultPlugins)
.add_plugins(bevy_easings::EasingsPlugin::new())
.add_plugins(bevy_easings::EasingsPlugin::default())
.add_systems(Startup, setup)
.run();

Expand Down
2 changes: 1 addition & 1 deletion examples/sprite_color_space.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use bevy_easings::{Ease, *};
fn main() -> Result<(), Box<dyn std::error::Error>> {
App::default()
.add_plugins(DefaultPlugins)
.add_plugins(bevy_easings::EasingsPlugin::new())
.add_plugins(bevy_easings::EasingsPlugin::default())
.add_systems(Startup, setup)
.run();

Expand Down
2 changes: 1 addition & 1 deletion examples/sprite_size.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use bevy_easings::Ease;
fn main() -> Result<(), Box<dyn std::error::Error>> {
App::default()
.add_plugins(DefaultPlugins)
.add_plugins(bevy_easings::EasingsPlugin::new())
.add_plugins(bevy_easings::EasingsPlugin::default())
.add_systems(Startup, setup)
.run();

Expand Down
2 changes: 1 addition & 1 deletion examples/transform_rotation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use bevy_easings::Ease;
fn main() -> Result<(), Box<dyn std::error::Error>> {
App::default()
.add_plugins(DefaultPlugins)
.add_plugins(bevy_easings::EasingsPlugin::new())
.add_plugins(bevy_easings::EasingsPlugin::default())
.add_systems(Startup, setup)
.run();

Expand Down
2 changes: 1 addition & 1 deletion examples/transform_translation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use bevy_easings::{Ease, *};
fn main() -> Result<(), Box<dyn std::error::Error>> {
App::default()
.add_plugins(DefaultPlugins)
.add_plugins(bevy_easings::EasingsPlugin::new())
.add_plugins(bevy_easings::EasingsPlugin::default())
.add_systems(Startup, setup)
.run();

Expand Down
2 changes: 1 addition & 1 deletion examples/ui_color.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use bevy_easings::Ease;
fn main() -> Result<(), Box<dyn std::error::Error>> {
App::default()
.add_plugins(DefaultPlugins)
.add_plugins(bevy_easings::EasingsPlugin::new())
.add_plugins(bevy_easings::EasingsPlugin::default())
.add_systems(Startup, setup)
.run();

Expand Down
2 changes: 1 addition & 1 deletion examples/ui_style.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use bevy_easings::Ease;
fn main() -> Result<(), Box<dyn std::error::Error>> {
App::default()
.add_plugins(DefaultPlugins)
.add_plugins(bevy_easings::EasingsPlugin::new())
.add_plugins(bevy_easings::EasingsPlugin::default())
.add_systems(Startup, setup)
.run();

Expand Down
5 changes: 2 additions & 3 deletions src/plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@ pub struct EasingsPlugin<Time: Default = ()> {
_marker: std::marker::PhantomData<Time>,
}

impl EasingsPlugin<()> {
/// Create a new instance of the plugin
pub fn new() -> Self {
impl Default for EasingsPlugin<()> {
fn default() -> Self {
Self {
_marker: std::marker::PhantomData,
}
Expand Down

0 comments on commit 14de224

Please sign in to comment.