Skip to content

Sequence (Unity API)

Erik Loyer edited this page Jun 30, 2018 · 3 revisions

The Sequence object manages a group of step objects which are to be triggered successively. Sequence objects contain the bulk of the content of a story as a series of Steps. Sequences can shuffle or repeat, and a given story can draw upon multiple sequences simultaneously, non-linearly, or in any number of ways.

Public Properties

Property Type Description
count int The number of times the sequence is allowed to repeat (-1 = infinite).
grouping string The grouping pattern for the sequence.
id string The unique id of the sequence.
isCompleted bool If true, the sequence has played all of its steps in the current repeat.
isExhausted bool If true, the sequence has played all of its repeats.
parentScore Score The Score that contains this sequence.
percentCompleted float The percentage of steps that have been played in the current repeat.
repeat bool If true, the sequence will repeat.
shuffle bool If true, the sequence will play its steps randomly.
stepIndex int Index of the current step.
steps List<Step> A list of the sequence's steps.
completions int The number of repeats the sequence has completed.

Constructor

new Sequence(string text, Score score)

Creates a new Sequence from the given line-delimited string, owned by the given Score.

new Sequence(XMLElement xml, Score score)

Creates a new Sequence from the given Stepwise XML, owned by the given Score.

Clone this wiki locally