DHAY4KB3FVA3WZVBDVVGGBGLEACA7C4PFKSKGHNFOSXVNGYOXJ7AC
ZUZLL6PWZE57MLTQJ56MT3HGIQU6NEHQRB63VQYJRY5HNVC7NVMAC
DBHCCY3W2DG4WYMXBZ2UCNYVGZ5PS5UUUNWCXVYJ4TMXQDIZT6GAC
7FTW5AQKOO4W5AIHYZSAKLQR6LGVTXH7SKMSTA4ER4C4HP54VE4QC
.init_resource::<You>()
.add_systems(OnEnter(GameState::InGame), new_run_new_you)
/// While in a run, this is who you are#[derive(Resource, Default)]struct You(Option<ulid::Ulid>);impl You { pub fn new() -> Self { Self(Some(ulid::Ulid::new())) }}/// Create a new You every runfn new_run_new_you(mut you: ResMut<You>) { *you = You::new();}
/// While in a run, this is who you are
#[derive(Resource, Default)]
struct You(Option<ulid::Ulid>);
impl You {
pub fn new() -> Self {
Self(Some(ulid::Ulid::new()))
}
/// Create a new You every run
fn new_run_new_you(mut you: ResMut<You>) {
*you = You::new();