DoTween实现Blink
#
function Blink(go, blinkNum, blinkDuration) local blinkInterval = 1 / blinkNum local halfBlickInterval = blinkInterval * 0.5 local tweener = DOTween.To(function(prg) if prg >= 1 then go:ActiveTrans(true) return end local m = math.fmod(prg, blinkInterval) if m > halfBlickInterval then go:ActiveTrans(false) else go:ActiveTrans(true) end end, 0, 1, blinkDuration):SetEase(Ease.Linear) return tweener end