public static void SetActiveColors(this BeatmapEventType lse)
 {
     foreach (LSEColorManager l in LSEColorManager.GetLSEColorManager(lse))
     {
         l.SetActiveColors();
     }
 }
        public static void RegisterLight(MonoBehaviour lightWithId)
        {
            switch (lightWithId)
            {
            case LightWithIdMonoBehaviour monoBehaviour:
                LSEColorManager monomanager = LSEColorManager.GetLSEColorManager((BeatmapEventType)(monoBehaviour.lightId - 1))?.Where(n => n.Lights != null).First();
                if (monomanager == null)
                {
                    break;
                }

                LightIDTableManager.RegisterIndex(monoBehaviour.lightId - 1, monomanager.Lights.Count);
                monomanager.Lights.Add(monoBehaviour);
                break;

            case LightWithIds lightWithIds:
                IEnumerable <ILightWithId> lightsWithId = ((IEnumerable)_lightWithIdsData.GetValue(lightWithId)).Cast <ILightWithId>();
                foreach (ILightWithId light in lightsWithId)
                {
                    LSEColorManager manager = LSEColorManager.GetLSEColorManager((BeatmapEventType)(light.lightId - 1))?.Where(n => n.Lights != null).First();
                    if (manager == null)
                    {
                        continue;
                    }

                    LightIDTableManager.RegisterIndex(light.lightId - 1, manager.Lights.Count);
                    manager.Lights.Add(light);
                }

                break;
            }
        }
 public static void SetLightingColors(this BeatmapEventType lse, Color?color0, Color?color1, Color?color0Boost = null, Color?color1Boost = null)
 {
     foreach (LSEColorManager l in LSEColorManager.GetLSEColorManager(lse))
     {
         l.SetLightingColors(color0, color1, color0Boost, color1Boost);
     }
 }
            internal static LSEColorManager CreateLSEColorManager(MonoBehaviour lse, BeatmapEventType type)
            {
                LSEColorManager lsecm;

                lsecm = new LSEColorManager(lse, type);
                _lseColorManagers.Add(lse, lsecm);
                return(lsecm);
            }
 public static void SetLightingColors(this MonoBehaviour lse, Color?color0, Color?color1, Color?color0Boost = null, Color?color1Boost = null)
 {
     LSEColorManager.GetLSEColorManager(lse)?.SetLightingColors(color0, color1, color0Boost, color1Boost);
 }
 public static void Reset(this MonoBehaviour lse)
 {
     LSEColorManager.GetLSEColorManager(lse)?.Reset();
 }
        /*
         * LSE ColorSO holders
         */

        internal static void LSEStart(MonoBehaviour lse, BeatmapEventType type)
        {
            LSEColorManager.CreateLSEColorManager(lse, type);
        }
 internal static ILightWithId[][] GetLightsPropagationGrouped(this LightSwitchEventEffect lse)
 {
     return(LSEColorManager.GetLSEColorManager(lse)?.LightsPropagationGrouped);
 }
 internal static List <ILightWithId> GetLights(this LightSwitchEventEffect lse)
 {
     return(LSEColorManager.GetLSEColorManager(lse)?.Lights);
 }
Example #10
0
 internal static void SetLastValue(this MonoBehaviour lse, int value)
 {
     LSEColorManager.GetLSEColorManager(lse)?.SetLastValue(value);
 }
Example #11
0
 internal static ILightWithId[] GetLights(this LightSwitchEventEffect lse)
 {
     return(LSEColorManager.GetLSEColorManager(lse)?.Lights.ToArray());
 }