All pages
Powered by GitBook
1 of 6

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

SetValue(string,float)

Method in IVariableStorage

Summary

Stores a float in this VariableStorage.

void SetValue(string variableName, float floatValue);

Parameters

Name
Description

string variableName

The name to associate with this variable.

float floatValue

The number to store.

IVariableStorage

Interface in Yarn

Summary

Provides a mechanism for storing and retrieving instances of the Yarn.Value class.

public interface IVariableStorage

Methods

Name
Description

Removes all variables from storage.

Stores a bool in this VariableStorage.

Stores a float in this VariableStorage.

Stores a string in this VariableStorage.

Retrieves a value of type T by name.

Clear()
SetValue(string,bool)
SetValue(string,float)
SetValue(string,string)
TryGetValue(string,T)

SetValue(string,bool)

Method in IVariableStorage

Summary

Stores a bool in this VariableStorage.

void SetValue(string variableName, bool boolValue);

Parameters

Name
Description

string variableName

The name to associate with this variable.

bool boolValue

The boolean value to store.

TryGetValue(string,T)

Method in IVariableStorage

Summary

Retrieves a value of type T by name.

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

Parameters

Name
Description

string variableName

Name
Description

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

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.

Type Parameters

Returns

SetValue(string,string)

Method in IVariableStorage

Summary

Stores a string in this VariableStorage.

void SetValue(string variableName, string stringValue);

Parameters

Name
Description

string variableName

Clear()

Method in

Removes all variables from storage.

The name to associate with this variable.

string stringValue

The string to store.

void Clear();

Summary

IVariableStorage