docs.unity.cn
    Show / Hide Table of Contents

    Class Currency

    Describes a currency.

    Inheritance
    Object
    CatalogItem
    TradableDefinition
    Currency
    Inherited Members
    CatalogItem.displayName
    CatalogItem.key
    CatalogItem.GetTags(ICollection<Tag>, Boolean)
    CatalogItem.HasTag(Tag)
    CatalogItem.GetStaticProperties()
    CatalogItem.GetStaticProperties(Dictionary<String, Property>)
    CatalogItem.HasStaticProperty(String)
    CatalogItem.GetStaticProperty(String)
    CatalogItem.TryGetStaticProperty(String, Property)
    CatalogItem.Item[String]
    Namespace: UnityEngine.GameFoundation
    Syntax
    public class Currency : TradableDefinition, IEquatable<CatalogItem>, IComparable<CatalogItem>, IQuantifiable, IEquatable<Currency>

    Properties

    maximumBalance

    The maximum balance the player can have. 0 means no limit.

    Declaration
    public long maximumBalance { get; }
    Property Value
    Type Description
    Int64

    quantity

    Quantity of this object.

    Declaration
    public long quantity { get; }
    Property Value
    Type Description
    Int64
    Implements
    IQuantifiable.quantity

    type

    Tells whether the currency is Soft or Hard.

    Declaration
    public CurrencyType type { get; }
    Property Value
    Type Description
    CurrencyType

    Methods

    Equals(Object)

    Tells whether this Currency instance equals obj.

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    Object obj

    The other object to compare this instance with.

    Returns
    Type Description
    Boolean

    true if equals, false otherwise.

    Overrides
    CatalogItem.Equals(Object)

    GetHashCode()

    Gets the hash code of this CatalogItem instance. Returns the hash code of its key.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    Int32

    The hash code of this CatalogItem instance.

    Overrides
    CatalogItem.GetHashCode()

    ToString()

    Gets the string representation of this Currency instance.

    Declaration
    public override string ToString()
    Returns
    Type Description
    String

    The string representation of this Currency instance.

    Overrides
    Object.ToString()
    Back to top Copyright © 2020 Unity Technologies
    Generated by DocFX
    on 16 June 2021