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:
Nathan Stocks 2021-06-22 16:57:48 +00:00
parent 39271f24d2
commit f71f93c843

View File

@ -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>,