예제 #1
0
 public void AddCell(FieldCell cell)
 {
     cells.Add(cell.GetCx(), cell.GetCy(), cell);
     if (cell.IsMovable())
     {
         AddMovable(cell.AsMovable());
     }
 }
예제 #2
0
 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;
     }
 }
예제 #4
0
 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;
        }
예제 #6
0
        public bool Contains(FieldCell cell)
        {
            if (staticCell == cell)
            {
                return(true);
            }

            if (cell.IsMovable() && movableCells.Contains(cell.AsMovable()))
            {
                return(true);
            }

            return(false);
        }
예제 #7
0
 public void RemoveCell(FieldCell cell)
 {
     cells.Remove(cell);
     if (cell.IsMovable())
     {
         RemoveMovable(cell.AsMovable());
     }
     CancelAllTimers(cell);
 }
예제 #8
0
 public void AddCell(FieldCell cell)
 {
     cells.Add(cell.GetCx(), cell.GetCy(), cell);
     if (cell.IsMovable())
     {
         AddMovable(cell.AsMovable());
     }
 }
        public virtual bool HandleCollision(FieldCell cell)
        {
            if (cell.IsMovable())
            {
                return HandleCollision(cell.AsMovable());
            }

            return HandleStaticCollision(cell);
        }