//----------------------------------------------------------------------------------- void SetPos(ref Net.PosRot curFigurePos) { if (figure != null) { figure.pos.x = curFigurePos.x; figure.pos.y = curFigurePos.y; figure.rot = curFigurePos.r; } }
//----------------------------------------------------------------------------------- public void SetPos(Net.PosRot curFigurePos, bool bFinal) { DrawCurrentFigure(false); SetPos(ref curFigurePos); DrawCurrentFigure(true); if (bFinal) { SetNewFigure(null, null, 0); if (FindFullLines()) { CollapseLines(); } } }
private static short SzerializePos(StreamBuffer outStream, object customobject) { PosRot pos = (PosRot)customobject; lock (memPos) { byte[] bytes = memPos; memPos[0] = (byte)pos.x; memPos[1] = (byte)pos.y; memPos[2] = (byte)pos.r; outStream.Write(bytes, 0, 3); } return(3); }
//----------------------------------------------------------------------------------- public void NewFigure(Figure.EType eType, Net.PosRot curFigurePos) { DrawCurrentFigure(false); SetNewFigure(new Figure(eType), new VecInt2(curFigurePos.x, curFigurePos.y), curFigurePos.r); DrawCurrentFigure(true); }