lib/core/phaser.js
function setPhase(priv, phase) {
  check(phase, 'phase').is.oneOf(PHASE_VALUES)();
  if (priv.phase !== null) {
    priv.elem.classList.remove(priv.phase);
  }
  priv.phase = phase;

  if (phase !== null) {
    priv.elem.classList.add(phase);
  }
  priv.listeners.forEach(function(listener) {
    listener(phase);
  });
  maybeStart(priv);
}
function setPhase(priv, phase) {
  check(phase, 'phase').is.oneOf(PHASE_VALUES)();
  if (priv.phase !== null) {
    priv.elem.classList.remove(priv.phase);
  }
  priv.phase = phase;

  if (phase !== null) {
    priv.elem.classList.add(phase);
  }
  priv.listeners.forEach(function(listener) {
    listener(phase);
  });
  maybeStart(priv);
}
function setPhase ( priv , phase ) { check ( phase , 'phase' ) . is . oneOf ( PHASE_VALUES ) ( ) ; if ( priv . phase !== null ) { priv . elem . classList . remove ( priv . phase ) ; } priv . phase = phase ; if ( phase !== null ) { priv . elem . classList . add ( phase ) ; } priv . listeners . forEach ( function ( listener ) { listener ( phase ) ; } ) ; maybeStart ( priv ) ; }
Changes current phase.

Invoking this method will result in setting CSS class name
of requested phase on container element.

@param {String} phase desired phase
@fqn Phaser.prototype.setPhase
Changes current phase .