DEVELOPMENT ENVIRONMENT

~liljamo/deck-builder

ref: 443c9b0c1e96aadaa1aff06953210c400b7fc0c9 deck-builder/client/src/plugins/async_tasks/mod.rs -rw-r--r-- 1.8 KiB
443c9b0c — skye feat!(client): get in-game, and see some details 1 year, 5 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/*
 * 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_join;
pub use req_game_join::GameJoinCallEvent;

mod req_game_forming;
pub use req_game_forming::GameFormingCallEvent;

mod req_game_mygames;
pub use req_game_mygames::GameMyGamesCallEvent;

mod req_game_details;
pub use req_game_details::GameDetailsCallEvent;

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::<GameJoinCallEvent>()
            .add_event::<GameFormingCallEvent>()
            .add_event::<GameMyGamesCallEvent>()
            .add_event::<GameDetailsCallEvent>()
            .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_join::start_call,
                req_game_join::handle_call,
                req_game_forming::start_call,
                req_game_forming::handle_call,
                req_game_mygames::start_call,
                req_game_mygames::handle_call,
                req_game_details::start_call,
                req_game_details::handle_call,
            ).chain()
        );
    }
}