Show / Hide Table of Contents

    Interface IExchangeRateMultiplier

    Allows an exchange rate to be calculated between two IExchangeable objects.

    Inherited Members
    IEntity.Id
    IEntity.Initialize()
    IEntity.Cleanup(IEntityLoaderService)
    Namespace: IdleKit.Gameplay
    Assembly: cs.temp.dll.dll
    Syntax
    public interface IExchangeRateMultiplier : IEntity, IInjectable

    Properties

    ExchangeRateMultiplierData

    The data used by the IExchangeRateMultiplier entity.

    Declaration
    IExchangeRateMultiplierData ExchangeRateMultiplierData { get; }
    Property Value
    Type Description
    IExchangeRateMultiplierData

    Methods

    GetExchangeInputAmount(IExchangeable, IExchangeable, Double)

    Calculates the required input amount to perform an exchange of the two different IExchangeable objects that yields the requiredAmount.

    Declaration
    double GetExchangeInputAmount(IExchangeable inputExchangeable, IExchangeable outputExchangeable, double requiredAmount)
    Parameters
    Type Name Description
    IExchangeable inputExchangeable
    IExchangeable outputExchangeable
    Double requiredAmount
    Returns
    Type Description
    Double

    GetRate(IExchangeable, IExchangeable)

    Calculates an exchange rate based on the values of two different IExchangeable objects, taking into account Multiplier

    Declaration
    double GetRate(IExchangeable inputExchangeable, IExchangeable outputExchangeable)
    Parameters
    Type Name Description
    IExchangeable inputExchangeable
    IExchangeable outputExchangeable
    Returns
    Type Description
    Double

    The value of inputExchangeable as compared to outputExchangeable. The larger the value, the more valuable inputExchangeable is in the comparison. See IExchangeRateMultiplier for a specific example of use.

    Back to top Copyright © 2020 East Side Games Inc.