Ejemplo n.º 1
0
        private static Color32 getDepositColor(ResourceDefinition definition, IBodyResources bodyResources, ICellResource deposit)
        {
            Color32 color;

            if (deposit != null)
            {
                var ratio = (float)(deposit.Quantity / bodyResources.MaxQuantity);
                color = (Color32)(definition.ColorFull * ratio + definition.ColorEmpty * (1 - ratio));
            }
            else
            {
                color = colorEmpty;
            }
            return(color);
        }
Ejemplo n.º 2
0
 private static Color32 getDepositColor(ResourceDefinition definition, IBodyResources bodyResources, ICellResource deposit)
 {
     Color32 color;
     if (deposit != null)
     {
         var ratio = (float)(deposit.Quantity / bodyResources.MaxQuantity);
         color = (Color32)(definition.ColorFull * ratio + definition.ColorEmpty * (1 - ratio));
     }
     else
     {
         color = colorEmpty;
     }
     return color;
 }
Ejemplo n.º 3
0
 protected BodyResourceData(IBodyResources resources, CellSet scans)
 {
     Resources  = resources;
     this.scans = scans;
 }
Ejemplo n.º 4
0
 protected BodyResourceData(IBodyResources resources, CellSet scans)
 {
     Resources = resources;
     this.scans = scans;
 }