lastPiece新增放置的方块位置、中心位置和朝向信息
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user