Options
All
  • Public
  • Public/Protected
  • All
Menu

This defines an interface for easier operations on Atom lists. Note: Every AtomCollection belongs to exactly one AggregatorValue.

Hierarchy

  • AtomCollection

Index

Constructors

constructor

  • Returns AtomCollection

Properties

Readonly id

id: string

Unique Id.

Private subscriptionList

subscriptionList: SubscriptionAtom[]

List structure that holds all subscriptions of an AggregatorValue.

Accessors

length

  • get length(): number
  • Returns the number of subscriptions of an AggregatorValue.

    Returns number

Methods

addSubscription

  • Register a new subscription for an AggregatorValue.

    Parameters

    Returns string

    The unique Id of the new subscription.

deleteSubscription

  • deleteSubscription(aggSubAtomId: string): void
  • Delete an exiting subscription of an AggregatorValue.

    Parameters

    • aggSubAtomId: string

      The unique subscription Id that is going to be deleted.

    Returns void

getAtom

  • Fetch a subscription object.

    Parameters

    • aggSubAtomId: string

      The unique Id of the subscription.

    Returns undefined | SubscriptionAtom

    The subscription object if it exists, undefined otherwise.

getList

  • Return the internal data representation.

    Returns SubscriptionAtom[]

hasSubscription

  • hasSubscription(aggSubAtomId: string): boolean
  • Checks if a subscription exists.

    Parameters

    • aggSubAtomId: string

      The unique subscription Id that is about to be checked.

    Returns boolean

    True if the subscription exists.

updateValues

  • Update all calculated values of a subscription of an AggregatorValue, i.e. after a player interaction.

    Parameters

    • aggValueId: string

      Unique Id of the AggregatorValue that is about to be updated.

    • aggCollection: AggregatorCollection

      The AggregatorCollection, holding information about the new value of the subscriptions.

    Returns void

Generated using TypeDoc