diff --git a/lovethreads/conf.lua b/lovethreads/conf.lua new file mode 100644 index 0000000..c202fa9 --- /dev/null +++ b/lovethreads/conf.lua @@ -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 diff --git a/lovethreads/main.lua b/lovethreads/main.lua new file mode 100644 index 0000000..5016548 --- /dev/null +++ b/lovethreads/main.lua @@ -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 \ No newline at end of file diff --git a/lovethreads/multi b/lovethreads/multi new file mode 120000 index 0000000..b870225 --- /dev/null +++ b/lovethreads/multi @@ -0,0 +1 @@ +../ \ No newline at end of file