phetsims / vegas

Reusable game components for PhET simulations.
MIT License
1 stars 4 forks source link

Modify RewardDialog constructor to take `scoreProperty:Property<number>` #116

Closed pixelzoom closed 1 year ago

pixelzoom commented 1 year ago

Modify RewardDialog constructor to take scoreProperty:Property<number>, so that one instance can be reused. This is important for PhET-iO instrumentation of games, like the "Solve It!" game in equality-explorer https://github.com/phetsims/equality-explorer/issues/192. The alternative is to use PhetioCapsule.

pixelzoom commented 1 year ago

@kathy-phet @samreid @zepumph FYI.

pixelzoom commented 1 year ago

RewardDialog's constructor signature is now:

public constructor( score: number | TReadOnlyProperty<number>, providedOptions?: RewardDialogOptions )

Closing.