mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
remove ToColor32
This commit is contained in:
parent
cb1c3891fa
commit
73b03a3557
@ -44,7 +44,7 @@ namespace NewHorizons.Builder.Atmosphere
|
||||
var cloudMaterial = new Material(gdRuleset._cloudMaterial);
|
||||
if (config.Atmosphere?.clouds?.tint != null)
|
||||
{
|
||||
cloudMaterial.SetColor(FogColor, config.Atmosphere.clouds.tint.ToColor32());
|
||||
cloudMaterial.SetColor(FogColor, config.Atmosphere.clouds.tint.ToColor());
|
||||
}
|
||||
ER._cloudMaterial = cloudMaterial;
|
||||
|
||||
|
||||
@ -24,8 +24,8 @@ namespace NewHorizons.Builder.Body
|
||||
new Material(sandMaterials[1])
|
||||
};
|
||||
GameObject.Destroy(oldMR);
|
||||
sandMR.sharedMaterials[0].color = module.Tint.ToColor32();
|
||||
sandMR.sharedMaterials[1].color = module.Tint.ToColor32();
|
||||
sandMR.sharedMaterials[0].color = module.Tint.ToColor();
|
||||
sandMR.sharedMaterials[1].color = module.Tint.ToColor();
|
||||
}
|
||||
|
||||
var collider = GameObject.Instantiate(GameObject.Find("TowerTwin_Body/SandSphere_Draining/Collider"), sandGO.transform);
|
||||
|
||||
@ -57,13 +57,13 @@ namespace NewHorizons.Builder.Orbital
|
||||
}
|
||||
|
||||
var color = Color.white;
|
||||
if (config.Orbit.tint != null) color = config.Orbit.tint.ToColor32();
|
||||
else if (config.Star != null) color = config.Star.tint.ToColor32();
|
||||
else if (config.Atmosphere?.clouds?.tint != null) color = config.Atmosphere.clouds.tint.ToColor32();
|
||||
if (config.Orbit.tint != null) color = config.Orbit.tint.ToColor();
|
||||
else if (config.Star != null) color = config.Star.tint.ToColor();
|
||||
else if (config.Atmosphere?.clouds?.tint != null) color = config.Atmosphere.clouds.tint.ToColor();
|
||||
else if (config.Singularity != null) color = new Color(1f, 0.5f, 1f);
|
||||
else if (config.Water != null) color = new Color(0.5f, 0.5f, 1f);
|
||||
else if (config.Lava != null) color = new Color(1f, 0.5f, 0.5f);
|
||||
else if (config.Atmosphere != null && config.Atmosphere.fogTint != null) color = config.Atmosphere.fogTint.ToColor32();
|
||||
else if (config.Atmosphere != null && config.Atmosphere.fogTint != null) color = config.Atmosphere.fogTint.ToColor();
|
||||
|
||||
var fade = isMoon;
|
||||
|
||||
|
||||
@ -39,9 +39,6 @@ namespace NewHorizons.Utility
|
||||
[DefaultValue(255f)]
|
||||
public int a;
|
||||
|
||||
public Color32 ToColor32() => new Color32((byte)r, (byte)g, (byte)b, (byte)a);
|
||||
|
||||
public Color ToColor() => new Color(r / 255f, g / 255f, b / 255f, a / 255f);
|
||||
public static implicit operator Color(MColor c) => new Color(c.r / 255f, c.g / 255f, c.b / 255f, c.a / 255f);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user