Rewriting loveManager, too much outdated code
This commit is contained in:
parent
cec53f6f4e
commit
f4cdde6040
20
lovethreads/conf.lua
Normal file
20
lovethreads/conf.lua
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
function love.conf(t)
|
||||||
|
t.identity = nil -- The name of the save directory (string)
|
||||||
|
t.version = "12.0" -- The LOVE version this game was made for (string)
|
||||||
|
t.console = true -- Attach a console (boolean, Windows only)
|
||||||
|
|
||||||
|
-- t.modules.audio = false -- Enable the audio module (boolean)
|
||||||
|
-- t.modules.event = false -- Enable the event module (boolean)
|
||||||
|
-- t.modules.graphics = false -- Enable the graphics module (boolean)
|
||||||
|
-- t.modules.image = false -- Enable the image module (boolean)
|
||||||
|
-- t.modules.joystick = false -- Enable the joystick module (boolean)
|
||||||
|
-- t.modules.keyboard = false -- Enable the keyboard module (boolean)
|
||||||
|
-- t.modules.math = false -- Enable the math module (boolean)
|
||||||
|
-- t.modules.mouse = false -- Enable the mouse module (boolean)
|
||||||
|
-- t.modules.physics = false -- Enable the physics module (boolean)
|
||||||
|
-- t.modules.sound = false -- Enable the sound module (boolean)
|
||||||
|
-- t.modules.system = true -- Enable the system module (boolean)
|
||||||
|
-- t.modules.timer = true -- Enable the timer module (boolean)
|
||||||
|
-- t.modules.window = false -- Enable the window module (boolean)
|
||||||
|
-- t.modules.thread = true -- Enable the thread module (boolean)
|
||||||
|
end
|
||||||
28
lovethreads/main.lua
Normal file
28
lovethreads/main.lua
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
package.path = "../?/init.lua;../?.lua;"..package.path
|
||||||
|
local multi, thread = require("multi"):init()
|
||||||
|
|
||||||
|
local GLOBAL, THREAD = require("multi.integration.loveManager"):init()
|
||||||
|
|
||||||
|
GLOBAL["Test"] = {1,2,3, function() print("HI") end}
|
||||||
|
|
||||||
|
for i,v in pairs(GLOBAL["Test"]) do
|
||||||
|
print(i,v)
|
||||||
|
if type(v) == "function" then v() end
|
||||||
|
end
|
||||||
|
|
||||||
|
multi:newAlarm(3):OnRing(function()
|
||||||
|
GLOBAL["Test2"] = "We got a value!"
|
||||||
|
end)
|
||||||
|
|
||||||
|
thread:newThread(function()
|
||||||
|
print("Waiting...")
|
||||||
|
print(THREAD.waitFor("Test2"))
|
||||||
|
end)
|
||||||
|
|
||||||
|
function love.draw()
|
||||||
|
--
|
||||||
|
end
|
||||||
|
|
||||||
|
function love.update()
|
||||||
|
multi:uManager()
|
||||||
|
end
|
||||||
1
lovethreads/multi
Symbolic link
1
lovethreads/multi
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../
|
||||||
Loading…
x
Reference in New Issue
Block a user