lastPiece新增放置的方块位置、中心位置和朝向信息

This commit is contained in:
MrZ626
2021-08-02 22:54:38 +08:00
parent dea2f6c8d7
commit d0f77f4b78
2 changed files with 6 additions and 0 deletions

View File

@@ -197,6 +197,10 @@ local function newEmptyPlayer(id,mini)
P.lastPiece={
id=0,name=0,--block id/name
curX=0,curY=0,--block position
centX=0,centY=0,--center position
dir=0,--direction
frame=-1e99,--lock time
autoLock=true,--if lock with gravity

View File

@@ -978,6 +978,8 @@ do--Player.drop(self)--Place piece
local dospin,mini=0
piece.id,piece.name=C.id,C.name
piece.curX,piece.curY,piece.dir=self.curX,self.curY,C.dir
piece.centX,piece.centY=self.curX+C.sc[2],self.curY+C.sc[1]
piece.frame,piece.autoLock=self.frameRun,autoLock
self.waiting=ENV.wait