15 lines
358 B
Lua
15 lines
358 B
Lua
local Vector2 = require "types.vector2"
|
|
local player = require "player"
|
|
|
|
-- called every frame, with constant delta time
|
|
function game_tick()
|
|
-- ctx.initialization_needed is true first frame and every time dynamic reload is performed
|
|
if ctx.initialization_needed then
|
|
player:init()
|
|
ctx.udata = {}
|
|
end
|
|
|
|
draw_camera_2d{}
|
|
player:tick(ctx)
|
|
end
|