From fdbbdfea05183f21af9d66ac8ea0816a327f53c1 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Sun, 13 Dec 2020 23:37:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DIMG=E6=A8=A1=E5=9D=97?= =?UTF-8?q?=E5=8A=A0=E8=BD=BD=E8=AE=A1=E6=95=B0=E5=99=A8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Zframework/image.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Zframework/image.lua b/Zframework/image.lua index ff927698..921cba5a 100644 --- a/Zframework/image.lua +++ b/Zframework/image.lua @@ -10,9 +10,11 @@ function IMG.init(list) end function IMG.getCount()return count end local function load(skip) + local loaded=0 for k,v in next,list do IMG[k]=love.graphics.newImage("media/image/"..v) - if not skip and i~=count then + loaded=loaded+1 + if not skip and loaded~=count then coroutine.yield() end end