{"size": 1116, "ext": "js", "max_stars_repo_path": "src/animation/animaciondraw.js", "max_stars_repo_name": "Drete457/ImergeGaveDevJS", "max_stars_repo_stars_event_min_datetime": "2020-07-21T01:04:26.000Z", "max_stars_repo_stars_event_max_datetime": "2020-07-21T01:04:26.000Z", "max_issues_repo_path": "src/animation/animaciondraw.js", "max_issues_repo_name": "Drete457/ImergeGaveDevJS", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/animation/animaciondraw.js", "max_forks_repo_name": "Drete457/ImergeGaveDevJS", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 24.8, "max_line_length": 63, "alphanum_fraction": 0.6657706093}
class AnimationDraw {
  constructor(
    image,
    inicialPositionX,
    inicialPositionY,
    characterWidth,
    characterHeight,
    sizeX,
    sizeY,
    spritePositionX,
    spritePositionY,
  ) {
    //character position and image on the screen
    this.image = image;
    this.inicialPositionX = inicialPositionX;
    this.inicialPositionY = inicialPositionY;

    //size of the character on the screen
    this.characterWidth = characterWidth;
    this.characterHeight = characterHeight;

    //size of the character in the file
    this.sizeX = sizeX;
    this.sizeY = sizeY;

    //reference of the image in the sprite
    this.spritePositionX = spritePositionX;
    this.spritePositionY = spritePositionY;
  }

  draw() {
    image(
      this.image,
      this.inicialPositionX,
      this.inicialPositionY, //1º x,y -> position on the screen
      this.characterWidth,
      this.characterHeight, //2º x,y -> size in the screen
      this.spritePositionX,
      this.spritePositionY, //3º x,y -> reference to the image
      this.sizeX,
      this.sizeY,
    ); //4º x,y -> position of the image
  }
}
