{"size": 394, "ext": "js", "max_stars_repo_path": "client/src/objects/background.js", "max_stars_repo_name": "Zorz42/ptrun-pixelart", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "client/src/objects/background.js", "max_issues_repo_name": "Zorz42/ptrun-pixelart", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "client/src/objects/background.js", "max_forks_repo_name": "Zorz42/ptrun-pixelart", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 26.2666666667, "max_line_length": 69, "alphanum_fraction": 0.6345177665}
import Phaser from 'phaser';

export class Background extends Phaser.GameObjects.TileSprite {
    constructor(scene, x, y, width, height, texture) {
        super(scene, x, y, width, height, texture);
        this.setOrigin(0);
        this.setScrollFactor(0, 0);
        this.setScale(4);
    }

    update(args) {
        this.setTilePosition(this.scene.cameras.main.scrollX * 0.05);
    }
}
