All pages
Powered by GitBook
1 of 6

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

SetValue(string,float)

Method in MemoryVariableStore

Summary

Stores a float in this VariableStorage.

public void SetValue(string variableName, float floatValue)

Parameters

Name
Description

string variableName

The name to associate with this variable.

float floatValue

The number to store.

Clear()

Method in MemoryVariableStore

Summary

Removes all variables from storage.

public void Clear()

SetValue(string,string)

Method in MemoryVariableStore

Summary

Stores a string in this VariableStorage.

public void SetValue(string variableName, string stringValue)

Parameters

Name
Description

string variableName

The name to associate with this variable.

string stringValue

The string to store.

SetValue(string,bool)

Method in MemoryVariableStore

Summary

Stores a bool in this VariableStorage.

public void SetValue(string variableName, bool boolValue)

Parameters

Name
Description

TryGetValue(string,T)

Method in MemoryVariableStore

Summary

Retrieves a value of type T by name.

public bool TryGetValue<T>(string variableName, out T result)

Parameters

Name
Description

Type Parameters

Name
Description

Returns

true if a value named variableName of type T was retrieved; false otherwise.

MemoryVariableStore

Class in Yarn

Inherits from System.Object

Summary

A simple concrete implementation of IVariableStorage that keeps all variables in memory.

public class MemoryVariableStore : IVariableStorage

Methods

Name
Description

string variableName

The name to associate with this variable.

bool boolValue

The boolean value to store.

string variableName

The name of the variable to retrieve the value of.

T result

On return, if this method returned true, contains the retrieved value. If this method returned false, contains the default value of T (for example, 0 for float values, null for strings, and so on.)

T

The type of the variable to retrieve.

Clear()

Removes all variables from storage.

SetValue(string,bool)

Stores a bool in this VariableStorage.

SetValue(string,float)

Stores a float in this VariableStorage.

SetValue(string,string)

Stores a string in this VariableStorage.

TryGetValue(string,T)

Retrieves a value of type T by name.