예제 #1
0
 public override void Destroy(bool modifyLevel = false)
 {
     output.Destroy();
     output = null;
     input.Destroy();
     input = null;
     base.Destroy(modifyLevel);
 }
예제 #2
0
        public virtual void Destroy(bool modifyLevel = false)
        {
            if (modifyLevel)
            {
                Globals.level.rails.Remove(this as Rail);
            }
            else
            {
                placedItems.Remove(this);
                //Globals.level.rails.Remove(cell.rail);
            }
            cell.item    = null;
            cell.isEmpty = true;

            if (power != null)
            {
                power.Destroy();
            }

            //SetGridCell(new Cell(x, y));
        }