public void UpdateMyGridColor(bool bCanPutTemp = true) { List <Int2> moveToGrids = m_Core.GetMovetoRoomGridPos(m_posMapGrid); if (!bCanPutTemp) { TouchMoveManager.SetGridsBgStates(moveToGrids, CanvasUnitState.CanntPut, true); return; } if (PutCanvasM.CheckCanPut(m_Core, m_posMapGrid)) { TouchMoveManager.SetGridsBgStates(moveToGrids, CanvasUnitState.CanPut, true); } else { TouchMoveManager.SetGridsBgStates(moveToGrids, CanvasUnitState.CanntPut, true); } if (null != m_ExchangeTouch) { moveToGrids = m_ExchangeTouch.MyCore().GetMovetoRoomGridPos(m_orgPosMapGrid); if (PutCanvasM.CheckCanPut(m_ExchangeTouch.MyCore(), m_orgPosMapGrid)) { TouchMoveManager.SetGridsBgStates(moveToGrids, CanvasUnitState.CanPut, false); } else { TouchMoveManager.SetGridsBgStates(moveToGrids, CanvasUnitState.CanntPut, false); } } }
public void ResetPos() { GenerateDeck(); List <Int2> moveToGrids = new List <Int2>(); moveToGrids.Add(m_posMapGrid); TouchMoveManager.SetGridsBgStates(moveToGrids, CanvasUnitState.Normal, true); m_posMapGrid = m_orgPosMapGrid; m_tTarget.localPosition = GetPosByGrid(m_orgPosMapGrid); }