mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Check if scaleCurve is null
This commit is contained in:
parent
fcad6d8b65
commit
e89e4aa95d
@ -14,9 +14,17 @@ namespace NewHorizons.Components.SizeControllers
|
|||||||
public float size = 1f;
|
public float size = 1f;
|
||||||
|
|
||||||
protected void FixedUpdate()
|
protected void FixedUpdate()
|
||||||
|
{
|
||||||
|
if(scaleCurve != null)
|
||||||
{
|
{
|
||||||
CurrentScale = scaleCurve.Evaluate(TimeLoop.GetMinutesElapsed()) * size;
|
CurrentScale = scaleCurve.Evaluate(TimeLoop.GetMinutesElapsed()) * size;
|
||||||
base.transform.localScale = new Vector3(CurrentScale, CurrentScale, CurrentScale);
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
CurrentScale = size;
|
||||||
|
}
|
||||||
|
|
||||||
|
base.transform.localScale = Vector3.one * CurrentScale;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user