Yarn Spinner
2.2 (Current)
Search…
⌃K
Links

BasicBlock

Class in Yarn.Compiler
Inherits from System.Object

Summary

A basic block is a run of instructions inside a Node. Basic blocks group instructions up into segments such that execution only ever begins at the start of a block (that is, a program never jumps into the middle of a block), and execution only ever leaves at the end of a block.
public class BasicBlock

Classes

Name
Description
A command that will be executed.
A line of dialogue that should be shown to the player.
A collection of options that should be shown to the player.
An abstract class that represents some content that is shown to the player.

Enums

Name
Description
Condition
The conditions under which a Destination may be reached at the end of a BasicBlock.

Methods

Name
Description
Adds a new destination to this block, that points to a node.
Adds a new destination to this block, that points to another block.

Properties

Name
Description
Ancestors
Get the ancestors of this block - that is, blocks that may run immediately before this block.
Gets all descendants (that is, destinations, and destinations of those destinations, and so on), recursively.
Gets all descendants (that is, destinations, and destinations of those destinations, and so on) that have any player-visible content, recursively.
Gets the destinations of this block - that is, blocks or nodes that may run immediately after this block.
Gets the index of the first instruction of the node that this block is in.
Gets the Instructions that form this block.
LabelName
Gets the name of the label that this block begins at, or null if this basic block does not begin at a labelled instruction.
Name
Gets a descriptive name for the block.
NodeName
Gets the name of the node that this block is in.
Gets the collection of player-visible content that will be delivered when this block is run.

Structs

Name
Description
A destination represents a BasicBlock or node that may be run, following the execution of a BasicBlock .