From d5480d9781f9eb8dca9fe67eb17538ee1d576efb Mon Sep 17 00:00:00 2001 From: FreezeDriedMangoes Date: Fri, 27 Jan 2023 13:40:06 -0500 Subject: [PATCH] generated spirals now start off in the hidden state, allowing the reveal on translate stuff to work --- .../Builder/Props/NomaiText/NomaiTextArcArranger.cs | 2 ++ NewHorizons/Builder/Props/NomaiText/NomaiTextArcBuilder.cs | 7 ++----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/NewHorizons/Builder/Props/NomaiText/NomaiTextArcArranger.cs b/NewHorizons/Builder/Props/NomaiText/NomaiTextArcArranger.cs index 978b894a..26ffe171 100644 --- a/NewHorizons/Builder/Props/NomaiText/NomaiTextArcArranger.cs +++ b/NewHorizons/Builder/Props/NomaiText/NomaiTextArcArranger.cs @@ -171,6 +171,8 @@ namespace NewHorizons.Builder.Props // TODO: for integration with NH - before generating spirals, seed the RNG with the hash of the XML filename for this convo // and add an option to specify the seed + // TODO: make all spirals unrevealed at first except the root spiral + Dictionary childForces = new Dictionary(); //Debug.Log(reverseToposortedSpirals.Count); diff --git a/NewHorizons/Builder/Props/NomaiText/NomaiTextArcBuilder.cs b/NewHorizons/Builder/Props/NomaiText/NomaiTextArcBuilder.cs index 57b38bc8..58aa8e1f 100644 --- a/NewHorizons/Builder/Props/NomaiText/NomaiTextArcBuilder.cs +++ b/NewHorizons/Builder/Props/NomaiText/NomaiTextArcBuilder.cs @@ -74,13 +74,10 @@ namespace NewHorizons.Builder.Props .ToArray(); owNomaiTextLine._points = _points; - //owNomaiTextLine._lengths = _points.Take(_points.Count()-1).Select((point, i) => Vector3.Distance(point, _points[i+1])).ToArray(); - //owNomaiTextLine._totalLength = owNomaiTextLine._lengths.Aggregate(0f, (acc, length) => acc + length); - owNomaiTextLine._state = NomaiTextLine.VisualState.UNREAD; + owNomaiTextLine._state = NomaiTextLine.VisualState.HIDDEN; owNomaiTextLine._textLineLocation = NomaiText.Location.UNSPECIFIED; - //owNomaiTextLine._center = _points.Aggregate(Vector3.zero, (acc, point) => acc + point) / (float)_points.Count(); - //owNomaiTextLine._radius = _points.Aggregate(0f, (acc, point) => Mathf.Max(Vector3.Distance(owNomaiTextLine._center, point), acc)); owNomaiTextLine._active = true; + owNomaiTextLine._prebuilt = false; g.SetActive(true); return g;