【警告:可能有bug,需要测试】

较大规模整理玩家相关代码
较大规模整理玩家相关代码,重构出块延迟和消行延迟逻辑,现在0是真的无延迟,不再有1帧等待了
添加出块延迟打断(即ARE打断)(不包括消行延迟,默认为打断至无穷大,相当于无此功能)
自定义游戏和自定义房间ui跟进
close #471
This commit is contained in:
MrZ626
2021-11-23 20:26:31 +08:00
parent 95879827c8
commit 83bdd9f2c4
19 changed files with 407 additions and 389 deletions

View File

@@ -170,7 +170,7 @@ local function _drawField(P,showInvis)
local V,F=P.visTime,P.field
local start=int((P.fieldBeneath+P.fieldUp)/30+1)
local texture=P.skinLib
if P.falling==-1 then--Blocks only
if P.falling==0 then--Blocks only
if ENV.upEdge then
gc_setShader(shader_lighter)
gc_translate(0,-4)
@@ -782,7 +782,7 @@ function draw.norm(P,repMode)
_drawFXs(P)
--Draw current block
if P.cur and P.waiting==-1 then
if P.cur and P.waiting==0 then
local C=P.cur
local curColor=C.color
@@ -997,7 +997,7 @@ function draw.demo(P)
gc_translate(0,600)
_drawField(P)
_drawFXs(P)
if P.cur and P.waiting==-1 then
if P.cur and P.waiting==0 then
if ENV.ghost then
drawGhost[ENV.ghostType](P.cur.bk,P.curX,P.ghoY,ENV.ghost,P.skinLib,curColor)
end