Skip to content

Commit

Permalink
Merge pull request #2283 from hawkthorne/master
Browse files Browse the repository at this point in the history
Turkey bugfix
  • Loading branch information
edisonout committed Oct 24, 2014
2 parents c1984f0 + 610b9b3 commit fe77586
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/nodes/enemy.lua
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,13 @@ function Enemy.new(node, collider, enemytype)

enemy.position_offset = enemy.props.position_offset or {x=0,y=0}

-- Height to be used when offsetting an enemy to its node
local height = node.height or enemy.height

-- adjust position so bottom is lined up with node bottom
enemy.position = {
x = node.x + ( enemy.position_offset.x or 0),
y = node.y + node.height - enemy.height + ( enemy.position_offset.y or 0)
y = node.y + height - enemy.height + ( enemy.position_offset.y or 0)
}
--enemy.velocity = enemy.props.velocity or {x=0,y=0}
enemy.velocity = {
Expand Down

0 comments on commit fe77586

Please sign in to comment.