Derive Clone for Time (#2360)
# Objective
- Make it so that `Time` can be cloned
- Makes it so I can clone the entire current `Time` and easily pass it to the user in [Rusty Engine](https://github.com/CleanCut/rusty_engine) instead of [doing this](8302dc3914/src/game.rs (L147-L150))
## Solution
- Derive the `Clone` trait on `Time`
This commit is contained in:
parent
39271f24d2
commit
f71f93c843
@ -2,7 +2,7 @@ use bevy_ecs::system::ResMut;
|
|||||||
use bevy_utils::{Duration, Instant};
|
use bevy_utils::{Duration, Instant};
|
||||||
|
|
||||||
/// Tracks elapsed time since the last update and since the App has started
|
/// Tracks elapsed time since the last update and since the App has started
|
||||||
#[derive(Debug)]
|
#[derive(Debug, Clone)]
|
||||||
pub struct Time {
|
pub struct Time {
|
||||||
delta: Duration,
|
delta: Duration,
|
||||||
last_update: Option<Instant>,
|
last_update: Option<Instant>,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user