Skip to content

Commit

Permalink
Update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Multirious committed Mar 26, 2024
1 parent bc7fd62 commit 5f428c4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@
//!
//! fn main() {
//! App::new().add_tween_systems((
//! bevy_tween::component_dyn_tween_system::<Foo>(),
//! bevy_tween::component_tween_system::<InterpolateFooA>(),
//! bevy_tween::component_tween_system::<InterpolateFooB>(),
//! bevy_tween::component_tween_system::<BoxedInterpolator<Foo>>,
//! bevy_tween::component_tween_system::<InterpolateFooA>,
//! bevy_tween::component_tween_system::<InterpolateFooB>,
//! ));
//! }
//! ```
Expand Down
18 changes: 9 additions & 9 deletions src/tween.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,23 +148,20 @@
//! use my_interpolate::*;
//!
//! App::new().add_tween_systems((
//! component_tween_system::<FooA>(),
//! component_tween_system::<FooB>(),
//! component_tween_system::<FooC>(),
//! component_tween_system::<FooA>,
//! component_tween_system::<FooB>,
//! component_tween_system::<FooC>,
//! ));
//! }
//! # }
//! ```
//!
//! ### Registering system for dynamic interpolator
//!
//! Dynamic interpolator means we're using dynamic dispatch.
//! Dynamic interpolator means we're using dynamic dispatch or trait object.
//! We don't have to register system for every interpolator, we only have to
//! register this system just for **every individual component**.
//! (Unless already registered by the [`DefaultTweenPlugins`])
//!
//! To register a dynamic interpolator for your component, you can use
//! [`component_dyn_tween_system`].
// ///! <div class="warning">
// ///! <a href="fn.component_dyn_tween_system.html"><code>component_dyn_tween_system</code></a> is type of dynamic
// ///! interpolator for <code>Box&lt;dyn Interpolator&gt;</code>.
Expand Down Expand Up @@ -215,13 +212,16 @@
//! # }
//! # }
//! fn main() {
//! use bevy_tween::component_dyn_tween_system;
//! use my_interpolate::*;
//!
//! // One system to rule them all
//! // Note that we're only using the `Foo` type, not `FooA`, `FooB`,
//! // and `FooC`!
//! App::new().add_tween_systems(component_dyn_tween_system::<Foo>());
//! App::new().add_tween_systems(
//! bevy_tween::component_tween_system::<BoxedInterpolator<Foo>>,
//! );
//! // BoxedInterpolator definition:
//! // type BoxedInterpolator<Item> = Box<dyn Interpolator<Item>>;
//! }
//! # }
//! ```
Expand Down

0 comments on commit 5f428c4

Please sign in to comment.