Exemplo n.º 1
0
    IEnumerator FindEventCallback()
    {
        yield return(new WaitUntil(() => GameObject.Find("Vertical Grid Callback")));

        callbackController = GameObject.Find("Vertical Grid Callback").GetComponent <BeatmapObjectCallbackController>();
        rotationCallback   = Resources.FindObjectsOfTypeAll <RotationCallbackController>().First();
        atsc = rotationCallback.atsc;
        if (RotationController != null)
        {
            RotationController.RotationCallback = rotationCallback;
            RotationController.Init();
        }
        callbackController.EventPassedThreshold += EventPassed;

        foreach (LightsManager manager in LightingManagers)
        {
            yield return(new WaitUntil(() => manager.ControllingLights.Any()));

            IEnumerable <LightingEvent> allLights      = manager.ControllingLights;
            IEnumerable <LightingEvent> lights         = allLights.Where(x => !x.UseInvertedPlatformColors);
            IEnumerable <LightingEvent> invertedLights = allLights.Where(x => x.UseInvertedPlatformColors);
            manager.ChangeColor(BlueColor, 0, lights);
            manager.ChangeColor(RedColor, 0, invertedLights);
        }
    }
Exemplo n.º 2
0
    IEnumerator FindEventCallback()
    {
        yield return(new WaitUntil(() => GameObject.Find("Vertical Grid Callback")));

        callbackController = GameObject.Find("Vertical Grid Callback").GetComponent <BeatmapObjectCallbackController>();
        rotationCallback   = Resources.FindObjectsOfTypeAll <RotationCallbackController>().First();
        if (RotationController != null)
        {
            RotationController.RotationCallback = rotationCallback;
            RotationController.Init();
        }
        callbackController.EventPassedThreshold += EventPassed;
    }
Exemplo n.º 3
0
 private void LevelLoaded()
 {
     callbackController = GameObject.Find("Vertical Grid Callback").GetComponent <BeatmapObjectCallbackController>();
     rotationCallback   = Resources.FindObjectsOfTypeAll <RotationCallbackController>().First();
     atsc = rotationCallback.atsc;
     if (RotationController != null)
     {
         RotationController.RotationCallback = rotationCallback;
         RotationController.Init();
     }
     callbackController.EventPassedThreshold += EventPassed;
     RefreshLightingManagers();
 }
Exemplo n.º 4
0
    public void UpdateRotateTrack(bool enabled)
    {
        Settings.Instance.RotateTrack = enabled;
        OptionsController.Find <TracksManager>()?.RefreshTracks();
        if (Settings.Instance.RotateTrack == enabled)
        {
            return;
        }
        RotationCallbackController callbackController = OptionsController.Find <RotationCallbackController>();

        if (!Settings.Instance.RotateTrack)
        {
            callbackController?.RotationChangedEvent?.Invoke(false, 0);
        }

        PersistentUI.Instance.ShowDialogBox("If you are in the editor, side effects can happen." +
                                            "\n\nIf the rotation of the track is not aligned, going back to the beginning or reloading the editor should fix it."
                                            , null, PersistentUI.DialogBoxPresetType.Ok);
    }