code: function Swipe(game, model) {
    var self = this;
  
    self.DIRECTION_UP = 1;
    self.DIRECTION_DOWN = 2;
    self.DIRECTION_LEFT = 4;
    self.DIRECTION_RIGHT = 8;
    self.DIRECTION_UP_RIGHT = 16;
    self.DIRECTION_UP_LEFT = 32;
    self.DIRECTION_DOWN_RIGHT = 64;
    self.DIRECTION_DOWN_LEFT = 128;
  
    self.game = game;
    self.model = model !== undefined ? model : null;
    self.dragLength = 100;
    self.diagonalDelta = 50;
    self.swiping = false;
    self.direction = null;
    self.tmpDirection = null;
    self.tmpCallback = null;
    self.diagonalDisabled = false;
  
    this.game.input.onDown.add(function () {
      self.swiping = true;
    });
    this.game.input.onUp.add(function () {
      self.swiping = false;
    })
  
    this.setupKeyboard();
  }
docs: Created by flogvit on 2015-11-03.
  
  @copyright Cellar Labs AS, 2015, www.cellarlabs.com, all rights reserved
  @file
  @license MIT
  @author Vegard Hanssen <Vegard.Hanssen@cellarlabs.com>