Skip to content

Commit

Permalink
Converted to use PhetioObject, see phetsims/tandem#46
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid authored and jessegreenberg committed Apr 21, 2021
1 parent f39be18 commit 539ea86
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions js/photon-absorption/model/PhotonAbsorptionModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ define( function( require ) {
var O3 = require( 'MOLECULES_AND_LIGHT/photon-absorption/model/molecules/O3' );
var ObservableArray = require( 'AXON/ObservableArray' );
var ObservableArrayIO = require( 'AXON/ObservableArrayIO' );
var PhetioObject = require( 'TANDEM/PhetioObject' );
var Photon = require( 'MOLECULES_AND_LIGHT/photon-absorption/model/Photon' );
var PhotonTarget = require( 'MOLECULES_AND_LIGHT/photon-absorption/model/PhotonTarget' );
var Property = require( 'AXON/Property' );
Expand Down Expand Up @@ -139,12 +140,15 @@ define( function( require ) {
this.photonEmissionCountdownTimer = Number.POSITIVE_INFINITY; // @private
this.photonEmissionPeriodTarget = DEFAULT_PHOTON_EMISSION_PERIOD; // @private

tandem.addInstance( this, { phetioType: PhotonAbsorptionModelIO } );
PhetioObject.call( this, {
tandem: tandem,
phetioType: PhotonAbsorptionModelIO
} );
}

moleculesAndLight.register( 'PhotonAbsorptionModel', PhotonAbsorptionModel );

return inherit( Object, PhotonAbsorptionModel, {
return inherit( PhetioObject, PhotonAbsorptionModel, {

/**
* Reset the model to its initial state.
Expand Down

0 comments on commit 539ea86

Please sign in to comment.