Exemplo n.º 1
0
 internal static void SubscribeEvents()
 {
     PauseToggled.Subscribe(OnGamePauseToggled);
     ModeInitialized.Subscribe(OnGameModeInitialized);
     ModeStarted.Subscribe(OnGameModeModeStarted);
     LocalCarHitFinish.Subscribe(OnRaceEndLocalCarHitFinish);
     EnterPlayMode.Subscribe(OnLevelEditorEnterPlayMode);
     EnterEditorMode.Subscribe(OnLevelEditorEnterEditorMode);
     UninitializeOptimizations.Subscribe(OnLevelUninitializeOptimizations);
 }
 private void fire_ModeStarted(ModeTypes type, string title)
 {
     if (ModeStarted != null)
     {
         try
         {
             ModeStarted.Invoke(this, new ModeEventArgs(type, title));
         }
         catch { }
     }
 }
Exemplo n.º 3
0
        static Game()
        {
            Events.GameMode.Finished.Subscribe(data =>
            {
                var eventArgs = new GameModeFinishedEventArgs((Network.NetworkGroup)data.NetworkGroup_);
                ModeFinished?.Invoke(null, eventArgs);
            });

            Events.GameMode.ModeStarted.Subscribe(data =>
            {
                ModeStarted?.Invoke(null, System.EventArgs.Empty);
            });
        }
Exemplo n.º 4
0
    static void ModeStartedHelper()
    {
        s_EffectsUnderway = false;

        ModeStarted?.Invoke(s_IsInPlayMode);
    }