Ejemplo n.º 1
0
        /// <summary>
        /// Called after EndGame
        /// </summary>
        public void Exit()
        {
            NativeFunction.arreterSons();
            cts.Cancel();
            OnlineSession.TerminateSession();

            _windowOpengl?.HideWinform();

            Program.MainWindow.Show();
        }
Ejemplo n.º 2
0
        private void Join()
        {
            // Don't join if already in game
            if (OnlineSession.Instance?.SessionId == _model.HashId)
            {
                CloseAction();
                return;
            }

            OnlineSession.TerminateSession();
            EventManager.Instance.Interrupt(new ChangeStateEvent()
            {
                NextState = Enums.States.OnlineGame
            });
            EventManager.Instance.Notice(new JoinOnlineGameRequestEvent()
            {
                HashId = _model.HashId, IsPrivate = _model.IsPrivate, Password = Password, Name = _model.Name
            });
            CloseAction();
        }