REWORKED HOW THINGS ARE SCALED

speed values should be adjusted accordingly, but maybe i slipped some

i changed:
player acc
arrow speed

i intentionally didnt change:
jump speed
This commit is contained in:
lustlion
2021-10-25 02:00:21 +02:00
parent 1e1f9edb45
commit b8b2525975
5 changed files with 27 additions and 22 deletions

View File

@@ -28,8 +28,8 @@ function Entity:Draw()
if self.sprite ~= nil then
local relative_position_x = self.pos.x - Camera.pos.x
local relative_position_y = self.pos.y - Camera.pos.y
local origin_compensation_x = - ( (self.sprite_offset.x) * math.cos(self.sprite_rotation) - (self.sprite_offset.y) * math.sin(self.sprite_rotation)) * game.scale
local origin_compensation_y = - ( (self.sprite_offset.x) * math.sin(self.sprite_rotation) + (self.sprite_offset.y) * math.cos(self.sprite_rotation)) * game.scale
local origin_compensation_x = - ( (self.sprite_offset.x) * math.cos(self.sprite_rotation) - (self.sprite_offset.y) * math.sin(self.sprite_rotation))
local origin_compensation_y = - ( (self.sprite_offset.x) * math.sin(self.sprite_rotation) + (self.sprite_offset.y) * math.cos(self.sprite_rotation))
local dimensions_x = self.sprite_scale.x * self.sprite_flip.x
local dimensions_y = self.sprite_scale.y * self.sprite_flip.y
love.graphics.draw(
@@ -37,8 +37,8 @@ function Entity:Draw()
relative_position_x + origin_compensation_x * dimensions_x,
relative_position_y + origin_compensation_y * dimensions_y,
self.sprite_rotation,
game.scale * self.sprite_scale.x * self.sprite_flip.x,
game.scale * self.sprite_scale.y * self.sprite_flip.y
self.sprite_scale.x * self.sprite_flip.x,
self.sprite_scale.y * self.sprite_flip.y
)
if debug_collision then
love.graphics.setColor(1, 0, 0)
@@ -78,8 +78,8 @@ function DrawAnimationFrame(animation, frame, x, y, rotate, sx, sy)
x - Camera.pos.x,
y - Camera.pos.y,
rotate,
game.scale * sx,
game.scale * sy
sx,
sy
)
end
@@ -107,8 +107,8 @@ function DrawAnimation(animation, x, y, rotate, sx, sy)
x - Camera.pos.x,
y - Camera.pos.y,
rotate,
game.scale * sx,
game.scale * sy
sx,
sy
)
end