class Choclo {
    float x;
    float y;
    boolean toDelete;
    
     Choclo(float x, float y)  {
       
        this.x = x;
        this.y = y;
        this.toDelete = false;
     }
  
    void show() {
        image(chocloImg, this.x, this.y, chocloImg.width, chocloImg.height );
    }
  
    void evaporate() {
        this.toDelete = true;
    }
  
    boolean hits (AnimatedSprite enemy) {
      float d = dist(this.x, this.y, enemy.x, enemy.y);
  
    if (d < (enemy.getWidth()/2)) {
            return true;
        } else {
            return false;
        }
    }
  
    void move () {
      this.y = this.y - 5;
    } 
}
