Ejemplo n.º 1
0
        public void Print(Blight blight, SectionLayer layer, Graphic newGraphic)
        {
            Plant plant = blight.Plant;

            if (plant != null)
            {
                PlantUtility.SetWindExposureColors(Blight.workingColors, plant);
            }
            else
            {
                Blight.workingColors[0].a = (Blight.workingColors[1].a = (Blight.workingColors[2].a = (Blight.workingColors[3].a = 0)));
            }
            float num = Blight.SizeRange.LerpThroughRange(blight.severity);

            if (plant != null)
            {
                float a = newGraphic.drawSize.x * plant.def.plant.visualSizeRange.LerpThroughRange(plant.Growth);
                num *= Mathf.Min(a, 1f);
            }
            num = Mathf.Clamp(num, 0.5f, 0.9f);
            Printer_Plane.PrintPlane(layer, blight.TrueCenter(), blight.def.graphic.drawSize * num, newGraphic.MatAt(blight.Rotation, blight), 0f, flipUv: false, null,
                                     Blight.workingColors, 0.1f);
        }