<commit_before>var Phaser = window.Phaser;

const CAMERA_MOVEMENT_SPEED = 300;
export default class CameraHandler {
  constructor({game, entityManager, map, cursors, cameraProperties, edgePixels}) {
    this.game = game;
    this.entityManager = entityManager;
    this.map = map;
    this.cursors = cursors;

    // create a camera unit
    this.camera = this.entityManager.createCamera(cameraProperties);

    this.createHorizontalMouseZone(edgePixels);
    this.createVerticalMouseZone(edgePixels);
  }

  // the zone that triggers horizontal movement
  createHorizontalMouseZone(edgePixels) {
    this.deadHorizontalRect = new Phaser.Rectangle(0, 0, this.game.width - (edgePixels * 2), this.game.height);
    this.deadHorizontalRect.centerX = this.game.camera.view.centerX;
    this.deadHorizontalRect.centerY = this.game.camera.view.centerY;<commit_msg>update camera handler to use the new entity manager method<commit_after>var Phaser = window.Phaser;

const CAMERA_MOVEMENT_SPEED = 300;
export default class CameraHandler {
  constructor({game, entityManager, map, cursors, cameraProperties, edgePixels}) {
    this.game = game;
    this.entityManager = entityManager;
    this.map = map;
    this.cursors = cursors;

    // create a camera unit
    this.entityManager.createCamera(cameraProperties);
    this.camera = this.entityManager.getEntity('camera');

    this.createHorizontalMouseZone(edgePixels);
    this.createVerticalMouseZone(edgePixels);
  }

  // the zone that triggers horizontal movement
  createHorizontalMouseZone(edgePixels) {
    this.deadHorizontalRect = new Phaser.Rectangle(0, 0, this.game.width - (edgePixels * 2), this.game.height);
    this.deadHorizontalRect.centerX = this.game.camera.view.centerX;
    this.deadHorizontalRect.centerY = this.game.camera.view.centerY;
{'fraction_non_alphanumeric': 0.10027700831024931, 'fraction_numerical': 0.006648199445983379, 'mean_word_length': 4.45619335347432, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5990009', 'n_tokens_mistral': 552, 'n_tokens_neox': 524, 'n_words': 111}