iOS设备震动函数改为输入1|2|3三档而不是时间(适配自改love,原版love都是固定振动)
框架不再使用不属于自己的SYSTEM的变量
This commit is contained in:
@@ -1,6 +1,12 @@
|
||||
local level={0,0,.01,.016,.023,.03,.04,.05,.06,.07,.08,.09,.12,.15}
|
||||
local vib=love.system.vibrate
|
||||
return function(t)
|
||||
t=level[t]
|
||||
if t then vib(t)end
|
||||
end
|
||||
return love.system.getOS()=='iOS'and
|
||||
function(t)
|
||||
t=level[t]
|
||||
if t then vib(t<=.03 and 1 or t<=.09 and 2 or 3)end
|
||||
end
|
||||
or
|
||||
function(t)
|
||||
t=level[t]
|
||||
if t then vib(t)end
|
||||
end
|
||||
Reference in New Issue
Block a user