dcearth/ai.lua

30 lines
539 B
Lua
Raw Normal View History

--Manage the AI nodes used by DEFCON.
local t = {}
local bmp = require 'bmp'
local lg = assert( love.graphics )
function t.load( filename )
local img, imgd = bmp.load( filename )
local nodes = {
visible = true,
att = {},
def = {},
img = img,
imgd = imgd }
print( "PIXEL: ", imgd:getPixel( 1, 1 ) )
return setmetatable( nodes, {__index = t } )
end
function t.draw( nodes )
lg.points( nodes.att )
lg.points( nodes.def )
lg.draw( nodes.img )
end
function t.save( nodes, filename )
end
return t