示例#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);
        }
 public void RemoveCell(FieldCell cell)
 {
     cells.Remove(cell);
     if (cell.IsMovable())
     {
         RemoveMovable(cell.AsMovable());
     }
     CancelAllTimers(cell);
 }
 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);
        }