Esempio n. 1
0
        private void Start()
        {
            ColorScheme colorScheme = ColorSchemeManager.GetMainColorScheme();
            Color       color       = colorScheme.saberAColor;

            Renderer[] childrenRenderers = gameObject.GetComponentsInChildren <Renderer>();
            for (int i = 0; i < childrenRenderers.Length; i++)
            {
                foreach (Material mat in childrenRenderers[i].materials)
                {
                    mat.color = color;
                    if (mat.HasProperty("_Color"))
                    {
                        mat.SetColor("_Color", color);
                    }
                    if (mat.HasProperty("_TintColor"))
                    {
                        mat.SetColor("_TintColor", color);
                    }
                    if (mat.HasProperty("_AddColor"))
                    {
                        mat.SetColor("_AddColor", (color * 0.5f).ColorWithAlpha(0f));
                    }
                }
            }
        }
Esempio n. 2
0
        public void SetPreviewSpectrogramColors()
        {
            ColorScheme colorScheme = ColorSchemeManager.GetMainColorScheme();

            if (leftSpectro)
            {
                leftSpectro.SetColor(colorScheme.saberAColor);
            }
            if (rightSpectro)
            {
                rightSpectro.SetColor(colorScheme.saberBColor);
            }
        }