       y: fireY
       direction: direction
     Common.Velocity.merge
-      x: velocity
-      y: 0
+      x: vx
+      y: vy
     Common.MapCollider
     Common.HitBox.merge
       width: 4


  _fireBullet: ->
    dir = @getProp('samus','direction')
    shortBeam = @getComp('short_beam')
    pos = @getComp('position')
    @newEntity newBullet(shortBeam,pos,dir)

  _startCooldown: (ms) ->
    @addComp Common.Timer.merge

Immutable = require 'immutable'
StateMachineSystem = require '../../../../ecs/state_machine_system'

MuzzleVelocity = 200/1000
BulletLifetime = 50 / (200/1000)

newBullet = (weapon, position,direction,shootUp) ->
  offsetX = offsetY = vx = vy = 0

  if shootUp
    offsetX = 2.5
    offsetY = -35
    vx = 0
    vy = -MuzzleVelocity
    if direction == 'left'
      offsetX = -2
  else
    offsetX = 10
    offsetY = -22
    vx = MuzzleVelocity
    vy = 0
    if direction == 'left'
      offsetX = -offsetX
      vx = -vx

  fireX = position.get('x') + offsetX
  fireY = position.get('y') + offsetY
