Ejemplo n.º 1
0
        public static BaseConnector FindConnector(Graphic graphic)
        {
            if (!graphic)
            {
                return(s_EmptyConnector);
            }

            var           type      = graphic.GetType();
            BaseConnector connector = null;

            if (s_ConnectorMap.TryGetValue(type, out connector))
            {
                return(connector);
            }

            foreach (var c in s_Connectors)
            {
                if (!c.IsValid(graphic))
                {
                    continue;
                }

                s_ConnectorMap.Add(type, c);
                return(c);
            }

            return(s_EmptyConnector);
        }
Ejemplo n.º 2
0
        public override void ModifyMaterial(Material newMaterial, Graphic graphic)
        {
            var connector = BaseConnector.FindConnector(graphic);

            newMaterial.shader = connector.FindShader("UIShiny");
            paramTex.RegisterMaterial(newMaterial);
        }
Ejemplo n.º 3
0
        public override void ModifyMaterial(Material newMaterial, Graphic graphic)
        {
            var connector = BaseConnector.FindConnector(graphic);

            newMaterial.shader = connector.FindShader("UIEffect");
            SetShaderVariants(newMaterial, m_EffectMode, m_ColorMode, m_BlurMode,
                              m_AdvancedBlur ? BlurEx.Ex : BlurEx.None);

            paramTex.RegisterMaterial(newMaterial);
        }
Ejemplo n.º 4
0
        public override void ModifyMaterial(Material newMaterial, Graphic graphic)
        {
            var connector = BaseConnector.FindConnector(graphic);

            newMaterial.shader = connector.FindShader("UIDissolve");
            SetShaderVariants(newMaterial, m_ColorMode);

            newMaterial.SetTexture(k_TransitionTexId, transitionTexture);
            paramTex.RegisterMaterial(newMaterial);
        }
Ejemplo n.º 5
0
 protected static void AddConnector(BaseConnector connector)
 {
     s_Connectors.Add(connector);
     s_Connectors.Sort((x, y) => y.priority - x.priority);
 }