<commit_before>import { ASSETS, PHYSICS, MATERIALS, STATES } from 'constants';

export default class Boot extends Phaser.State {
  preload() {
    const { load } = this.game;

    load.image(ASSETS.BACKGROUND, 'assets/img/background.png');
    load.spritesheet(ASSETS.BULLET, 'assets/img/bullet.png', 4, 4);
    load.spritesheet(ASSETS.BLOCK, 'assets/img/block.png', 40, 40);
    load.spritesheet(ASSETS.BUTTON, 'assets/img/button.png', 190, 49);
    load.spritesheet(ASSETS.ENEMY, 'assets/img/enemy.png', 20, 32);
    load.spritesheet(ASSETS.PLAYER, 'assets/img/player.png', 20, 32);
    load.spritesheet(ASSETS.TARGET, 'assets/img/target.png', 80, 80);

    this.game.load.physics(PHYSICS, 'assets/physics.json');

    this.game.physics.p2.createMaterial(MATERIALS.BULLET);
    this.game.physics.p2.createMaterial(MATERIALS.TARGET);
  }

  create() {
    this.game.state.start(STATES.TITLE);
    this.game.canvas.oncontextmenu = e => e.preventDefault(); // Disables right click
  }
}<commit_msg>Enable collision callbacks<commit_after>import { ASSETS, PHYSICS, MATERIALS, STATES } from 'constants';

export default class Boot extends Phaser.State {
  preload() {
    const { load } = this.game;

    load.image(ASSETS.BACKGROUND, 'assets/img/background.png');
    load.spritesheet(ASSETS.BULLET, 'assets/img/bullet.png', 4, 4);
    load.spritesheet(ASSETS.BLOCK, 'assets/img/block.png', 40, 40);
    load.spritesheet(ASSETS.BUTTON, 'assets/img/button.png', 190, 49);
    load.spritesheet(ASSETS.ENEMY, 'assets/img/enemy.png', 20, 32);
    load.spritesheet(ASSETS.PLAYER, 'assets/img/player.png', 20, 32);
    load.spritesheet(ASSETS.TARGET, 'assets/img/target.png', 80, 80);

    this.game.load.physics(PHYSICS, 'assets/physics.json');
    this.game.physics.p2.setImpactEvents(true);

    this.game.physics.p2.createMaterial(MATERIALS.BULLET);
    this.game.physics.p2.createMaterial(MATERIALS.TARGET);
  }

  create() {
    this.game.state.start(STATES.TITLE);
    this.game.canvas.oncontextmenu = e => e.preventDefault(); // Disables right click
  }
}
{'fraction_non_alphanumeric': 0.1610705596107056, 'fraction_numerical': 0.024817518248175182, 'mean_word_length': 4.114427860696518, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1025247', 'n_tokens_mistral': 825, 'n_tokens_neox': 743, 'n_words': 113}