{"size": 1033, "ext": "js", "max_stars_repo_path": "src/core/sprites.js", "max_stars_repo_name": "burningtomatoes/DonutAdventure", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/core/sprites.js", "max_issues_repo_name": "burningtomatoes/DonutAdventure", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/core/sprites.js", "max_forks_repo_name": "burningtomatoes/DonutAdventure", "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": 24.023255814, "max_line_length": 62, "alphanum_fraction": 0.5314617619}
var Sprites = {
    data: {},

    clear: function () {
        this.data = {};
    },

    load: function (fileName) {
        fileName = 'assets/sprites/' + fileName + '.png';

        if (typeof this.data[fileName] === 'undefined') {
            this.data[fileName] = new Image();
            this.data[fileName].src = fileName;
            console.info('[Sprites] Loaded sprite', fileName);
        }

        return this.data[fileName];
    },

    preload: function () {
        this.load('floor');
        this.load('brickwall_side');

        this.load('shadow');
        this.load('shadow_pickup');
        this.load('shadow_carrot');

        this.load('player');
        this.load('player_down');

        this.load('donut');
        this.load('carrot');

        this.load('shelving_unit_1');
        this.load('shelving_unit_2');
        this.load('shelving_unit_3');
        this.load('shelving_unit_4');
        this.load('shelving_unit_5');

        this.load('spillage');
        this.load('cardboard_box');
    }
};