mirror of
https://github.com/rayaman/multi.git
synced 2026-09-05 07:27:35 -04:00
Added some new methods (1.7.6)
More examples small tweaks added/modified examples typos as always minor bug fixes some new features, read readme for them
This commit is contained in:
+13
-1
@@ -45,7 +45,7 @@ function print(...)
|
||||
end
|
||||
end
|
||||
multi = {}
|
||||
multi.Version={1,7,5}
|
||||
multi.Version={1,7,6}
|
||||
multi.stage='stable'
|
||||
multi.__index = multi
|
||||
multi.Mainloop={}
|
||||
@@ -239,6 +239,15 @@ end
|
||||
function multi:getVersion()
|
||||
return multi.Version[1].."."..multi.Version[2].."."..multi.Version[3]
|
||||
end
|
||||
function multi:getPlatform()
|
||||
if love then
|
||||
if love.thread then
|
||||
return "love2d"
|
||||
end
|
||||
else
|
||||
return "lanes"
|
||||
end
|
||||
end
|
||||
--Processor
|
||||
function multi:getError()
|
||||
if self.error then
|
||||
@@ -1020,6 +1029,9 @@ function multi:newEvent(task)
|
||||
end
|
||||
end
|
||||
end
|
||||
function c:SetTask(func)
|
||||
self.Task=func
|
||||
end
|
||||
function c:OnEvent(func)
|
||||
table.insert(self.func,func)
|
||||
end
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
require("multi.compat.love2d")
|
||||
multi.intergration={}
|
||||
multi.intergration.love2d={}
|
||||
multi.intergration.love2d.ThreadBase=[[
|
||||
@@ -326,6 +327,7 @@ updater:OnUpdate(function(self)
|
||||
data=multi.intergration.love2d.mainChannel:pop()
|
||||
end
|
||||
end)
|
||||
print("Intergrated Love2d!")
|
||||
return {
|
||||
init=function(t)
|
||||
if t then
|
||||
|
||||
Reference in New Issue
Block a user