-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Merged by Bors] - Add default implementation of Serialize and Deserialize to Timer and Stopwatch #6248
Conversation
Yes, this is important state that will need to be e.g. transferred across the network.
No, this isn't used in that example, so should not be done to avoid distracting readers. |
Ping @bzm3r for a review. |
It's probably worth mentioning that when #6247 is merged, implementations for |
#6247 is getting merged, so I'm holding off on this for a sec. @SleepySwords can you add that impl to this PR when you get a second? Once that's done I'll merge this PR ASAP. |
bors r+ |
…Stopwatch (#6248) # Objective Fixes #6244 ## Solution Uses derive to implement `Serialize` and `Deserialize` for `Timer` and `Stopwatch` ### Things to consider - Should fields such as `finished` and `times_finished_this_tick` in `Timer` be serialized? - Does `Countdown` and `PrintOnCompletionTimer` need to be serialized and deserialized? ## Changelog Added `Serialize` and `Deserialize` implementations to `Timer` and `Stopwatch`, `Countdown`.
Pull request successfully merged into main. Build succeeded: |
…Stopwatch (bevyengine#6248) # Objective Fixes bevyengine#6244 ## Solution Uses derive to implement `Serialize` and `Deserialize` for `Timer` and `Stopwatch` ### Things to consider - Should fields such as `finished` and `times_finished_this_tick` in `Timer` be serialized? - Does `Countdown` and `PrintOnCompletionTimer` need to be serialized and deserialized? ## Changelog Added `Serialize` and `Deserialize` implementations to `Timer` and `Stopwatch`, `Countdown`.
…Stopwatch (bevyengine#6248) # Objective Fixes bevyengine#6244 ## Solution Uses derive to implement `Serialize` and `Deserialize` for `Timer` and `Stopwatch` ### Things to consider - Should fields such as `finished` and `times_finished_this_tick` in `Timer` be serialized? - Does `Countdown` and `PrintOnCompletionTimer` need to be serialized and deserialized? ## Changelog Added `Serialize` and `Deserialize` implementations to `Timer` and `Stopwatch`, `Countdown`.
…Stopwatch (bevyengine#6248) # Objective Fixes bevyengine#6244 ## Solution Uses derive to implement `Serialize` and `Deserialize` for `Timer` and `Stopwatch` ### Things to consider - Should fields such as `finished` and `times_finished_this_tick` in `Timer` be serialized? - Does `Countdown` and `PrintOnCompletionTimer` need to be serialized and deserialized? ## Changelog Added `Serialize` and `Deserialize` implementations to `Timer` and `Stopwatch`, `Countdown`.
…Stopwatch (bevyengine#6248) # Objective Fixes bevyengine#6244 ## Solution Uses derive to implement `Serialize` and `Deserialize` for `Timer` and `Stopwatch` ### Things to consider - Should fields such as `finished` and `times_finished_this_tick` in `Timer` be serialized? - Does `Countdown` and `PrintOnCompletionTimer` need to be serialized and deserialized? ## Changelog Added `Serialize` and `Deserialize` implementations to `Timer` and `Stopwatch`, `Countdown`.
Objective
Fixes #6244
Solution
Uses derive to implement
Serialize
andDeserialize
forTimer
andStopwatch
Things to consider
finished
andtimes_finished_this_tick
inTimer
be serialized?Countdown
andPrintOnCompletionTimer
need to be serialized and deserialized?Changelog
Added
Serialize
andDeserialize
implementations toTimer
andStopwatch
,Countdown
.