import { Entity } from "./Entity"
import { WorldContext } from "./World"

export class PuddleEntity extends Entity {
  lifetime: number = 400
  elapsed: number = 0
  constructor(ctor: string) {
    super(ctor)
    console.log(this.sprite)
  }
  update(delta: number, ctx?: WorldContext) {
    super.update(delta)
    this.elapsed += delta
    if (this.elapsed >= this.lifetime) {
      ctx?.removeEntity(this)
    }
  }

}