public void OnRight() { BlockTeam bt = m_CurBlockTeam; if (!IsCollide(bt, BT_Move_Type.BTM_Right)) { bt.MoveRight(); } }
public void OnRot() { if (m_CurBlockTeam == null) { return; } BlockTeam bt = m_CurBlockTeam.Clone(); bt.Rot(); if (!IsCollide(bt, BT_Move_Type.BTM_None)) { m_CurBlockTeam.Rot(); } else { BlockTeam btLeft = bt; BlockTeam btRight = bt.Clone(); for (int i = 0; i < bt.GetBlockWidth(); i++) { btLeft.MoveLeft(); if (!IsCollide(btLeft, BT_Move_Type.BTM_None)) { m_CurBlockTeam.Rot(); for (int j = i; j >= 0; j--) { m_CurBlockTeam.MoveLeft(); } break; } btRight.MoveRight(); if (!IsCollide(btRight, BT_Move_Type.BTM_None)) { m_CurBlockTeam.Rot(); for (int j = i; j >= 0; j--) { m_CurBlockTeam.MoveRight(); } break; } } } }