get static method

Returns an available GSimpleParticle instance.

If there are any instances in the cache, this method removes the first one and returns it. Otherwise, it creates a new instance and returns it.

Implementation

static GSimpleParticle get() {
  var instance = $availableInstance;
  if (instance != null) {
    $availableInstance = instance.$nextInstance;
    instance.$nextInstance = null;
  } else {
    instance = GSimpleParticle();
  }
  return instance;
}