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:
2017-06-26 23:18:38 -04:00
parent 1635a1633c
commit 38f8234d20
16 changed files with 150 additions and 29 deletions
+13 -1
View File
@@ -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
+2
View File
@@ -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