diff options
Diffstat (limited to 'entity.lua')
| -rw-r--r-- | entity.lua | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -172,9 +172,7 @@ function _get_animation_key(line_of_sight) return _animation_keys[n_line_of_sight.x + 2] .. "_x" end -function Entity:render() - pos = self.sprite_position or self.position - +function Entity:render(screen_position) animation = self.states[self.state].animation if (animation == nil) then return end if (self.line_of_sight ~= nil) then @@ -190,7 +188,7 @@ function Entity:render() reflection = animation.reflect or vec2(false, false) spr( frame, - self.sprite_position.x, self.sprite_position.y, + screen_position.x, screen_position.y, 1, 1, reflection.x, reflection.y ) |
