public void AddCell(FieldCell cell) { cells.Add(cell.GetCx(), cell.GetCy(), cell); if (cell.IsMovable()) { AddMovable(cell.AsMovable()); } }
public void RemoveCell(FieldCell cell) { cells.Remove(cell); if (cell.IsMovable()) { RemoveMovable(cell.AsMovable()); } CancelAllTimers(cell); }
public void AddCell(FieldCell cell) { if (cell.IsMovable()) { movableCells.Add(cell.AsMovable()); } else { Debug.Assert(staticCell == null); staticCell = cell; } }
public void RemoveCell(FieldCell cell) { if (cell.IsMovable()) { movableCells.Remove(cell.AsMovable()); } else { Debug.Assert(staticCell == cell); staticCell = null; } }
public bool Contains(FieldCell cell) { if (staticCell == cell) { return true; } if (cell.IsMovable() && movableCells.Contains(cell.AsMovable())) { return true; } return false; }
public bool Contains(FieldCell cell) { if (staticCell == cell) { return(true); } if (cell.IsMovable() && movableCells.Contains(cell.AsMovable())) { return(true); } return(false); }
public virtual bool HandleCollision(FieldCell cell) { if (cell.IsMovable()) { return HandleCollision(cell.AsMovable()); } return HandleStaticCollision(cell); }