class Effect extends Object {
  int timer;
  boolean active;
  Effect(float x, float y){
    this.x = x;
    this.y = y;
    timer = 0;
    active = true;
    println(x);
    println(y);
  }
  void update(){
    timer++;
    if (int(timer/(2)) >= poof.length) {
      active = false;
    }
  }
  void render(){
    if(active){
      imageMode(CENTER);
      image(poof[int(timer/(2))], x, y);
      imageMode(CORNER);
    }
  }
}