Ink.Parsed.Weave.AddRuntimeForWeavePoint C# (CSharp) Method

AddRuntimeForWeavePoint() public method

public AddRuntimeForWeavePoint ( IWeavePoint weavePoint ) : void
weavePoint IWeavePoint
return void
        void AddRuntimeForWeavePoint(IWeavePoint weavePoint)
        {
            // Current level Gather
            if (weavePoint is Gather) {
                AddRuntimeForGather ((Gather)weavePoint);
            } 

            // Current level choice
            else if (weavePoint is Choice) {

                // Gathers that contain choices are no longer loose ends
                // (same as when weave points get nested content)
                if (previousWeavePoint is Gather) {
                    looseEnds.Remove ((Parsed.Object)previousWeavePoint);
                }

                currentContainer.AddContent (((Choice)weavePoint).runtimeObject);
                hasSeenChoiceInSection = true;
            }

            // Keep track of loose ends
            addContentToPreviousWeavePoint = false; // default
            if (WeavePointHasLooseEnd (weavePoint)) {
                looseEnds.Add ((Parsed.Object)weavePoint);

                // If choice has an explicit gather divert ("->") then it doesn't need content added to it
                var looseChoice = weavePoint as Choice;
                if (looseChoice && !looseChoice.hasExplicitGather) {
                    addContentToPreviousWeavePoint = true;
                }
            }
            previousWeavePoint = weavePoint;
        }