public void JumpToScene(int build_index)
 {
     if (build_index == 2)
     {
         BatteryGolemAnalytics.SendGameStartedEvent();
     }
     LoadingScreen.LoadRoom(build_index);
 }
    public void ExitGame()
    {
        BatteryGolemAnalytics.SendGameQuitEvent();
#if UNITY_EDITOR
        UnityEditor.EditorApplication.isPlaying = false;
#else
        Application.Quit();
#endif
    }
    void OnTriggerEnter(Collider col)
    {
        if (!works)
        {
            return;
        }

        GameObject main = col.GetMainObject();

        if (main.tag == "Player")
        {
            if (filter && PlayerController.instance.movement.autoMoveID != idMustBe)
            {
                return;
            }

            works = false;

            PlayerSaving.SetExitID(exitID);

            // Spawn loading screen
            GameSaveManager.SaveRoom();
            if (openCredits)
            {
                // Load with a delegate callback
                LoadingScreen.LoadRoom(gotoRoomOnTrigger, ls => {
                    // Loaded callback
                    var buttonActions = FindObjectOfType <ButtonActions>();
                    if (buttonActions)
                    {
                        buttonActions.OpenCreditsMenu();
                    }
                });
                BatteryGolemAnalytics.SendGameCompletedEvent();
            }
            else
            {
                // Load normally
                LoadingScreen.LoadRoom(gotoRoomOnTrigger);
            }
        }
    }