Exemplo n.º 1
0
        public async Task <Process> LaunchGame(GameLaunchMode launchMode, bool joinServer = false)
        {
            if (!_settingsProvider.GetCurrentSettings().AcceptedEula)
            {
                return(null);
            }

            if (IsLaunching)
            {
                return(null);
            }

            IsLaunching = true;

            if (!joinServer)
            {
                SetJoinServerAddress(null);
            }

            _logger.Write($"Launching game. ({launchMode})");

            _notificationService.ShowNotification("Launching game...", Notification.ShortMessageDelay);
            _splashScreenProgressProvider.SetCurrentStep(SplashScreenProgressStep.Initializing);

            var gameProcess = launchMode == GameLaunchMode.Multiplayer ? await ExecuteGrandTheftMultiplayerLaunchSteps() : await ExecuteGtaLaunchSteps();

            IsLaunching = false;

            return(gameProcess);
        }
Exemplo n.º 2
0
 public LaunchGameMessage(GameLaunchMode launchMode, string joinServerIp, int joinServerPort)
     : base(nameof(LaunchGameMessage))
 {
     LaunchMode     = launchMode;
     JoinServerIp   = joinServerIp;
     JoinServerPort = joinServerPort;
     JoinServer     = true;
 }
Exemplo n.º 3
0
 public LaunchGameMessage(GameLaunchMode launchMode)
     : base(nameof(LaunchGameMessage))
 {
     LaunchMode = launchMode;
 }