This site is for Yarn Spinner v1, and won't be updated. Go to the current site.

Value Class

A value from inside Yarn.

public class Value : IComparable, IComparable<Value>

Constructors

Name Description
Value() Initializes a new instance of the Value class. The value will be null.
Value(Object) Initializes a new instance of the Value class, using the specified object.

Properties

Name Description
AsBool Gets the boolean representation of this value.
AsNumber Gets the numeric representation of this value.
AsString Gets the string representation of this value.
type Gets the underlying type of this value.

Methods

Name Description
CompareTo(Object) Compares this Value to another object. The other object must either be another instance of Value, or null.
CompareTo(Value) Compares this Value to another Value.
Equals(Object) Compares to see if this Value is the same as another.
GetHashCode() Returns the hash code for this value.
ToString() Converts this value to a string.

Fields

Name Description
NULL The shared Null value.

Operators

Name Description
Addition(Value, Value) Adds two values together.
Division(Value, Value) Divides two values.
GreaterThan(Value, Value) Compares two values, and returns true if the first is greater than the second.
GreaterThanOrEqual(Value, Value) Compares two values, and returns true if the first is greater than or equal to the second.
LessThan(Value, Value) Compares two values, and returns true if the first is less than the second.
LessThanOrEqual(Value, Value) Compares two values, and returns true if the first is less than or equal to the second.
Modulus(Value, Value) Calculates the remainder when dividing two values.
Multiply(Value, Value) Multiplies two values together.
Subtraction(Value, Value) Subtracts two values from each other.
UnaryNegation(Value) Computes the negative of a value.

Source

Defined in YarnSpinner/Value.cs, line 10.