This commit is contained in:
2020-07-14 22:04:03 +08:00
parent e54411e2c2
commit a47cabede2
119 changed files with 5115 additions and 1061 deletions

View File

@@ -40,7 +40,7 @@ function CLToastRoot.borrow()
else
cell = queue:deQueue()
end
cell.name = string.format("%11d",index)
cell.name = string.format("%11d", index)
index = index + 1
return cell
end
@@ -51,6 +51,9 @@ function CLToastRoot.returnToast(cell)
end
function CLToastRoot.toast(msg, type, staySec)
if isNilOrEmpty(msg) then
return
end
local cell = CLToastRoot.borrow()
SetActive(cell.gameObject, true)
cell:init({msg = msg, type = type, staySec = staySec}, nil)