Show / Hide Table of Contents

    Class UpgradeRequirement

    Defines a ICurrency or IUpgradeableCurrency cost required to upgrade

    Inheritance
    Object
    UpgradeRequirement
    Implements
    IUpgradeRequirement
    Inherited Members
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Object.ToString()
    Object.ReferenceEquals(Object, Object)
    Namespace: IdleKit.Gameplay
    Assembly: cs.temp.dll.dll
    Syntax
    public class UpgradeRequirement : IUpgradeRequirement

    Constructors

    UpgradeRequirement()

    The Beamable SDK requires empty default constructor.

    Declaration
    public UpgradeRequirement()

    UpgradeRequirement(String, Double)

    Declaration
    public UpgradeRequirement(string requirementId, double requiredAmount)
    Parameters
    Type Name Description
    String requirementId
    Double requiredAmount

    Properties

    RequiredAmount

    Declaration
    public double RequiredAmount { get; }
    Property Value
    Type Description
    Double

    RequirementId

    Declaration
    public string RequirementId { get; }
    Property Value
    Type Description
    String

    Methods

    CanUpgrade(Double)

    Returns true if the player has enough resources to meet these requirements

    Declaration
    public virtual bool CanUpgrade(double playerCurrencyAmount)
    Parameters
    Type Name Description
    Double playerCurrencyAmount
    Returns
    Type Description
    Boolean

    GetUpgradeProgression(Double)

    Returns the current progression towards being able to afford the requirement as a normalized value (0 - 1)

    Declaration
    public virtual float GetUpgradeProgression(double playerCurrencyAmount)
    Parameters
    Type Name Description
    Double playerCurrencyAmount
    Returns
    Type Description
    Single

    Implements

    IUpgradeRequirement
    Back to top Copyright © 2020 East Side Games Inc.