mirror of
https://gitlab.com/MaddoScientisto/cirnofarm.git
synced 2026-06-10 14:35:54 +00:00
Camera fix
This commit is contained in:
parent
5d624acaea
commit
93f95683c5
4 changed files with 654 additions and 72 deletions
17
src/game.lua
17
src/game.lua
|
|
@ -108,18 +108,30 @@ particles = {}
|
|||
|
||||
function _draw()
|
||||
cls(0)
|
||||
|
||||
|
||||
camera(cirnoInstance.x - 240, cirnoInstance.y - 135)
|
||||
|
||||
foreach(LAYERS, render_layer)
|
||||
|
||||
mouse_debug.draw(4, tile_width, tile_height)
|
||||
local mx,my = mouse()
|
||||
camera()
|
||||
mouse_debug.draw(mx,my,4, tile_width, tile_height)
|
||||
-- Draw UI
|
||||
draw_ui()
|
||||
weapons_manager.debug_draw()
|
||||
|
||||
|
||||
end
|
||||
|
||||
function draw_ui()
|
||||
print(string.format("Actors: %d", count(actors)),0,32+8)
|
||||
print(string.format("%.4f %dfps",stat(1),stat(7)),2,16,5)
|
||||
|
||||
|
||||
end
|
||||
|
||||
include(make_path("error_explorer") .. ".lua")
|
||||
|
||||
function spawn_objects()
|
||||
|
||||
local width = 32
|
||||
|
|
@ -149,7 +161,6 @@ function spawn_objects()
|
|||
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
||||
function get_actor_from_sprite(sprite)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue