game-programming-patterns icon indicating copy to clipboard operation
game-programming-patterns copied to clipboard

Object Pool / free list – Show how particles are initialized

Open munificent opened this issue 8 years ago • 0 comments

After moving the particle's state under the live union, it should also show an updated init() method where that state is set. Something like:

  void init(double x, double y,
            double xVel, double yVel, int lifetime)
  {
    live.x = x;
    live.y = y;
    live.xVel = xVel;
    live.yVel = yVel;
    framesLeft_ = lifetime;
  }

munificent avatar Jun 02 '17 14:06 munificent