returnInstance(instance) {
    // Call onDeath handler if available (and pass it current star instance)
    instance.onDeath && instance.onDeath(instance)
    // Clean up
    instance.onDeath = null
    instance.secondColor = null
    instance.secondColorTime = 0
    instance.colorChanged = false
    // Add back to the pool.
    this._pool.push(instance)
  }
// Public method for cleaning up and returning an instance back to the pool.
Public method for cleaning up and returning an instance back to the pool.
Public method for cleaning up and returning an instance back to the pool .
returnInstance(instance) {
    instance.onDeath && instance.onDeath(instance)
    instance.onDeath = null
    instance.secondColor = null
    instance.secondColorTime = 0
    instance.colorChanged = false
    this._pool.push(instance)
  }
returnInstance ( instance ) { instance . onDeath && instance . onDeath ( instance ) instance . onDeath = null instance . secondColor = null instance . secondColorTime = 0 instance . colorChanged = false this . _pool . push ( instance ) }
Public method for cleaning up and returning an instance back to the pool.
Public method for cleaning up and returning an instance back to the pool .
// Call onDeath handler if available (and pass it current star instance) // Clean up // Add back to the pool.