Ejemplo n.º 1
0
    private void SetFlashLight(bool flash)
    {
        Material material;

        if (flash)
        {
            material = ShaderEffectUtils.CreateAutoFlashLightMat(this.TimeOnce, this.Interval);
        }
        else
        {
            material = null;
        }
        Image component = base.GetComponent <Image>();

        if (component != null)
        {
            component.set_material(material);
        }
        else
        {
            RawImage component2 = base.GetComponent <RawImage>();
            if (component2 != null)
            {
                component2.set_material(material);
            }
        }
    }