C# Класс Ink.Runtime.StoryState

All story state information is included in the StoryState class, including global variables, read counts, the pointer to the current point in the story, the call stack (for tunnels, functions, etc), and a few other smaller bits and pieces. You can save the current state using the json serialisation functions ToJson and LoadJson.
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
AddError void
CompleteExternalFunctionEvaluation object
Copy StoryState
GoToStart void
MatchRightGlueForLeftGlue Runtime.Glue
PeekEvaluationStack Runtime.Object
PopEvaluationStack List
PopEvaluationStack Runtime.Object
PushEvaluationStack void
PushToOutputStream void
ResetErrors void
ResetOutput void
SetChosenPath void
StartExternalFunctionEvaluation void
StoryState System
TryExitExternalFunctionEvaluation bool
TrySplittingHeadTailWhitespace List

Открытые методы

Метод Описание
ForceEnd ( ) : void
LoadJson ( string json ) : void

Loads a previously saved state in JSON format.

PushToOutputStreamIndividual ( Runtime obj ) : void
RemoveExistingGlue ( ) : void
ToJson ( ) : string

Exports the current state to json format, in order to save the game.

TrimFromExistingGlue ( ) : void
TrimNewlinesFromOutputStream ( Glue rightGlueToStopAt ) : void
VisitCountAtPathString ( string pathString ) : int

Gets the visit/read count of a particular Container at the given path. For a knot or stitch, that path string will be in the form: knot knot.stitch

Приватные методы

Метод Описание
AddError ( string message ) : void
CompleteExternalFunctionEvaluation ( ) : object
Copy ( ) : StoryState
GoToStart ( ) : void
MatchRightGlueForLeftGlue ( Glue leftGlue ) : Runtime.Glue
PeekEvaluationStack ( ) : Runtime.Object
PopEvaluationStack ( int numberOfObjects ) : List
PopEvaluationStack ( ) : Runtime.Object
PushEvaluationStack ( Runtime obj ) : void
PushToOutputStream ( Runtime obj ) : void
ResetErrors ( ) : void
ResetOutput ( ) : void
SetChosenPath ( Path path ) : void
StartExternalFunctionEvaluation ( Container funcContainer ) : void
StoryState ( Story story ) : System
TryExitExternalFunctionEvaluation ( ) : bool
TrySplittingHeadTailWhitespace ( Runtime single ) : List

Описание методов

ForceEnd() публичный Метод

public ForceEnd ( ) : void
Результат void

LoadJson() публичный Метод

Loads a previously saved state in JSON format.
public LoadJson ( string json ) : void
json string The JSON string to load.
Результат void

PushToOutputStreamIndividual() публичный Метод

public PushToOutputStreamIndividual ( Runtime obj ) : void
obj Runtime
Результат void

RemoveExistingGlue() публичный Метод

public RemoveExistingGlue ( ) : void
Результат void

ToJson() публичный Метод

Exports the current state to json format, in order to save the game.
public ToJson ( ) : string
Результат string

TrimFromExistingGlue() публичный Метод

public TrimFromExistingGlue ( ) : void
Результат void

TrimNewlinesFromOutputStream() публичный Метод

public TrimNewlinesFromOutputStream ( Glue rightGlueToStopAt ) : void
rightGlueToStopAt Glue
Результат void

VisitCountAtPathString() публичный Метод

Gets the visit/read count of a particular Container at the given path. For a knot or stitch, that path string will be in the form: knot knot.stitch
public VisitCountAtPathString ( string pathString ) : int
pathString string The dot-separated path string of /// the specific knot or stitch.
Результат int