Exemple #1
0
    public static void SetFactionColorMaterialProperty(Renderer[] renderers, Color factionColor)
    {
        int num = 0;

        while (renderers != null && num < renderers.Length)
        {
            Renderer renderer = renderers[num];
            for (int i = 0; i < renderer.materials.Length; i++)
            {
                Material oneMaterial = renderer.materials[i];
                DiplomaticViewportUtilities.SetFactionColorMaterialProperty(oneMaterial, factionColor);
            }
            num++;
        }
    }
Exemple #2
0
 public static void SetFactionColorMaterialProperty(GameObject gameObject, Color factionColor)
 {
     Renderer[] componentsInChildren = gameObject.GetComponentsInChildren <Renderer>(true);
     DiplomaticViewportUtilities.SetFactionColorMaterialProperty(componentsInChildren, factionColor);
 }