mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Fix title scene body
This commit is contained in:
parent
a365f74760
commit
8334c67206
@ -20,8 +20,6 @@ namespace NewHorizons.Atmosphere
|
|||||||
|
|
||||||
if (atmo.CloudCap == null) cap = ImageUtilities.ClearTexture(128, 128);
|
if (atmo.CloudCap == null) cap = ImageUtilities.ClearTexture(128, 128);
|
||||||
else cap = assets.GetTexture(atmo.CloudCap);
|
else cap = assets.GetTexture(atmo.CloudCap);
|
||||||
|
|
||||||
//if(atmo.CloudRamp == null) ramp = ImageUtilities.Scaled(image, 1, 128);
|
|
||||||
if(atmo.CloudRamp == null) ramp = ImageUtilities.CanvasScaled(image, 1, image.height);
|
if(atmo.CloudRamp == null) ramp = ImageUtilities.CanvasScaled(image, 1, image.height);
|
||||||
else ramp = assets.GetTexture(atmo.CloudRamp);
|
else ramp = assets.GetTexture(atmo.CloudRamp);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -196,9 +196,10 @@ namespace NewHorizons
|
|||||||
HeightMapModule heightMap = new HeightMapModule();
|
HeightMapModule heightMap = new HeightMapModule();
|
||||||
var minSize = 20;
|
var minSize = 20;
|
||||||
var maxSize = 35;
|
var maxSize = 35;
|
||||||
|
float size = minSize;
|
||||||
if (body.Config.HeightMap != null)
|
if (body.Config.HeightMap != null)
|
||||||
{
|
{
|
||||||
var size = Mathf.Clamp(body.Config.HeightMap.MaxHeight / 10, minSize, maxSize);
|
size = Mathf.Clamp(body.Config.HeightMap.MaxHeight / 10, minSize, maxSize);
|
||||||
heightMap.TextureMap = body.Config.HeightMap.TextureMap;
|
heightMap.TextureMap = body.Config.HeightMap.TextureMap;
|
||||||
heightMap.HeightMap = body.Config.HeightMap.HeightMap;
|
heightMap.HeightMap = body.Config.HeightMap.HeightMap;
|
||||||
heightMap.MaxHeight = size;
|
heightMap.MaxHeight = size;
|
||||||
@ -208,7 +209,7 @@ namespace NewHorizons
|
|||||||
if (body.Config.Atmosphere != null && body.Config.Atmosphere.Cloud != null)
|
if (body.Config.Atmosphere != null && body.Config.Atmosphere.Cloud != null)
|
||||||
{
|
{
|
||||||
// Hacky but whatever I just want a sphere
|
// Hacky but whatever I just want a sphere
|
||||||
var size = Mathf.Clamp(body.Config.Atmosphere.Size / 10, minSize, maxSize);
|
size = Mathf.Clamp(body.Config.Atmosphere.Size / 10, minSize, maxSize);
|
||||||
heightMap.MaxHeight = heightMap.MinHeight = size+1;
|
heightMap.MaxHeight = heightMap.MinHeight = size+1;
|
||||||
heightMap.TextureMap = body.Config.Atmosphere.Cloud;
|
heightMap.TextureMap = body.Config.Atmosphere.Cloud;
|
||||||
flag = true;
|
flag = true;
|
||||||
@ -220,8 +221,8 @@ namespace NewHorizons
|
|||||||
if (body.Config.Ring != null)
|
if (body.Config.Ring != null)
|
||||||
{
|
{
|
||||||
RingModule newRing = new RingModule();
|
RingModule newRing = new RingModule();
|
||||||
newRing.InnerRadius = maxSize * 1.2f;
|
newRing.InnerRadius = size * 1.2f;
|
||||||
newRing.OuterRadius = maxSize * 2f;
|
newRing.OuterRadius = size * 2f;
|
||||||
newRing.Texture = body.Config.Ring.Texture;
|
newRing.Texture = body.Config.Ring.Texture;
|
||||||
RingBuilder.Make(titleScreenGO, newRing, body.Assets);
|
RingBuilder.Make(titleScreenGO, newRing, body.Assets);
|
||||||
titleScreenGO.transform.localScale = Vector3.one * 0.8f;
|
titleScreenGO.transform.localScale = Vector3.one * 0.8f;
|
||||||
@ -239,11 +240,6 @@ namespace NewHorizons
|
|||||||
light.range = 100;
|
light.range = 100;
|
||||||
light.intensity = 0.8f;
|
light.intensity = 0.8f;
|
||||||
}
|
}
|
||||||
|
|
||||||
var img = GameObject.Instantiate(GameObject.Find("TitleMenu/TitleCanvas/TitleLayoutGroup/Logo_EchoesOfTheEye").GetComponent<Image>());
|
|
||||||
var texture = Main.Instance.ModHelper.Assets.GetTexture("AssetBundle/logo.png");
|
|
||||||
img.sprite = Sprite.Create(texture, new Rect(0, 0, texture.width, texture.height), new Vector2(texture.width / 2f, texture.height / 2f));
|
|
||||||
img.transform.parent = GameObject.Find("TitleMenu").transform;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool LoadBody(NewHorizonsBody body, bool defaultPrimaryToSun = false)
|
private bool LoadBody(NewHorizonsBody body, bool defaultPrimaryToSun = false)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user