pecs_core 0.4.0

Asynchronous operations for Bevy Engine
Documentation
1
2
3
4
5
6
7
8
9
10
11
use bevy::app::AppExit;

use super::*;

pub fn exit() -> Promise<(), ()> {
    Promise::register(
        |world, _| world.resource_mut::<Events<AppExit>>().send(AppExit),
        // can't discard AppExit
        |_, _| {},
    )
}