Remove unused function room.edge_position

This commit is contained in:
백현웅 2025-01-04 13:27:27 +09:00
parent 00601ed4a9
commit c95593af3e

View file

@ -12,21 +12,6 @@ local room = entity:from{
objects = {}, objects = {},
} }
function edge_position(e)
local wd = screen.width - e.width
local hd = screen.height - e.height
local t = {
['left'] = { 0, hd/2 },
['right'] = { wd, hd/2 },
['up'] = { wd/2, 0 },
['down'] = { wd/2, hd },
}
local p = t[e.dir]
return p[1], p[2]
end
function room:insert(obj) function room:insert(obj)
table.insert(self.objects, obj) table.insert(self.objects, obj)
obj.idx = #self.objects obj.idx = #self.objects