C# Class 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.
Afficher le fichier Open project: inkle/ink Class Usage Examples

Private Properties

Свойство Type Description
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

Méthodes publiques

Méthode Description
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

Private Methods

Méthode Description
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

Method Details

ForceEnd() public méthode

public ForceEnd ( ) : void
Résultat void

LoadJson() public méthode

Loads a previously saved state in JSON format.
public LoadJson ( string json ) : void
json string The JSON string to load.
Résultat void

PushToOutputStreamIndividual() public méthode

public PushToOutputStreamIndividual ( Runtime obj ) : void
obj Runtime
Résultat void

RemoveExistingGlue() public méthode

public RemoveExistingGlue ( ) : void
Résultat void

ToJson() public méthode

Exports the current state to json format, in order to save the game.
public ToJson ( ) : string
Résultat string

TrimFromExistingGlue() public méthode

public TrimFromExistingGlue ( ) : void
Résultat void

TrimNewlinesFromOutputStream() public méthode

public TrimNewlinesFromOutputStream ( Glue rightGlueToStopAt ) : void
rightGlueToStopAt Glue
Résultat void

VisitCountAtPathString() public méthode

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.
Résultat int