/*
* This file is part of laurelin_client
* Copyright (C) 2023 Jonni Liljamo <jonni@liljamo.com>
*
* Licensed under GPL-3.0-only.
* See LICENSE for licensing information.
*/
use bevy::prelude::*;
mod req_login;
pub use req_login::LoginCallEvent;
mod req_register;
pub use req_register::RegisterCallEvent;
mod req_game_create;
pub use req_game_create::GameCreateCallEvent;
mod req_game_forming;
pub use req_game_forming::GameFormingCallEvent;
mod req_game_mygames;
pub use req_game_mygames::GameMyGamesCallEvent;
pub struct AsyncTasksPlugin;
impl Plugin for AsyncTasksPlugin {
fn build(&self, app: &mut App) {
app
.add_event::<LoginCallEvent>()
.add_event::<RegisterCallEvent>()
.add_event::<GameCreateCallEvent>()
.add_event::<GameFormingCallEvent>()
.add_event::<GameMyGamesCallEvent>()
.add_systems(
(
req_login::start_call,
req_login::handle_call,
req_register::start_call,
req_register::handle_call,
req_game_create::start_call,
req_game_create::handle_call,
req_game_forming::start_call,
req_game_forming::handle_call,
req_game_mygames::start_call,
req_game_mygames::handle_call,
).chain()
);
}
}