 
   _fireBullet: ->
     dir = @getProp('samus','direction')
+    shootUp = @getProp('samus','aim') == 'up'
     shortBeam = @getComp('short_beam')
     pos = @getComp('position')
-    @newEntity newBullet(shortBeam,pos,dir)
+    @newEntity newBullet(shortBeam,pos,dir,shootUp)
 
   _startCooldown: (ms) ->
     @addComp Common.Timer.merge

      y: fireY
      direction: direction
    Common.Velocity.merge
      x: velocity
      y: 0
    Common.MapCollider
    Common.HitBox.merge
      width: 4

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
