From c9c78e191dd71bacd769bbeccd58b80e4376184b Mon Sep 17 00:00:00 2001 From: LaG1924 <12997935+LaG1924@users.noreply.github.com> Date: Sat, 5 Aug 2017 20:07:10 +0500 Subject: 2017-08-05 --- src/Event.hpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'src/Event.hpp') diff --git a/src/Event.hpp b/src/Event.hpp index 229da19..c553058 100644 --- a/src/Event.hpp +++ b/src/Event.hpp @@ -11,6 +11,7 @@ #include "Vector.hpp" #include "Packet.hpp" +#include "FSM.hpp" enum class EventType { Echo, @@ -23,6 +24,7 @@ enum class EventType { RegisterNetworkClient, PlayerConnected, RemoveLoadingScreen, + ConnectionFailed, }; struct EchoData { @@ -47,12 +49,15 @@ struct ConnectionSuccessfullData { enum class GlobalState { InitialLoading, MainMenu, + Connecting, Loading, - InGame, + Playing, PauseMenu, Exiting, }; +void SetGlobalState(GlobalState state); + struct GlobalAppStateData { GlobalState state; }; @@ -87,9 +92,13 @@ struct RemoveLoadingScreenData { }; +struct ConnectionFailedData { + std::string reason; +}; + using EventData = std::variant; + RegisterNetworkClientData, PlayerConnectedData, RemoveLoadingScreenData, ConnectionFailedData>; struct Event { EventType type; -- cgit v1.2.3