bird/data/scripts/game.lua

15 lines
358 B
Lua
Raw Normal View History

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()
-- 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()
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