Quantity<T>
Struct in Zigurous.Architecture
Declaration
[Serializable]
public struct Quantity<T> : IEquatable<Quantity<T>> where T : IEquatable<T>
Description
Stores a quantity of a given entity type.
Type Parameters
T | The type of entity being counted. |
Properties
entity | The entity being counted. |
amount | The number of entities. |
Constructors
Quantity | Creates a new quantity with the specified amount of a given entity. |
Methods
Equals | Determines if the quantity is equal to another quantity. |
GetHashCode | Returns the hash code of the quantity. |
ToString | Converts the quantity to a string. |
Operators
Equality | Determines if two quantities are equal. |
Inequality | Determines if two quantities are not equal. |