2025-02-04 23:36:57 +00:00
|
|
|
local Vector2 = require "types.vector2"
|
|
|
|
local player = require "player"
|
|
|
|
|
2025-02-04 20:42:28 +00:00
|
|
|
-- called every frame, with constant delta time
|
|
|
|
function game_tick()
|
2025-02-04 20:54:05 +00:00
|
|
|
-- ctx.initialization_needed is true first frame and every time dynamic reload is performed
|
|
|
|
if ctx.initialization_needed then
|
2025-02-04 23:36:57 +00:00
|
|
|
player:init()
|
2025-02-04 20:54:05 +00:00
|
|
|
ctx.udata = {}
|
|
|
|
end
|
2025-02-04 23:36:57 +00:00
|
|
|
|
|
|
|
draw_camera_2d{}
|
|
|
|
player:tick(ctx)
|
2025-02-04 20:42:28 +00:00
|
|
|
end
|