Ejemplo n.º 1
0
        public override void Remove()
        {
            if (!IsRemovable)
            {
                return;
            }
            MicroWorld.Logics.CircuitManager.RemoveReUpdatingComponent(Logics as Logics.CapacitorLogics);

            for (int i = 0; i < Joints.Length; i++)
            {
                Joints[i].IsRemovable = true;
                Joints[i].ContainingComponents.Remove(this);
            }
            W1.IsRemovable = true;
            W2.IsRemovable = true;
            W3.IsRemovable = true;

            W1.Remove();
            W2.Remove();
            W3.Remove();
            for (int i = 0; i < Joints.Length; i++)
            {
                Joints[i].CanRemove = true;
                if (Joints[i].ConnectedWires.Count == 0)
                {
                    Joints[i].Remove();
                }
            }
            base.Remove();
        }
Ejemplo n.º 2
0
        public override void Remove()
        {
            if (!IsRemovable)
            {
                return;
            }
            for (int i = 0; i < Joints.Length; i++)
            {
                Joints[i].IsRemovable = true;
                Joints[i].ContainingComponents.Remove(this);
            }
            W1.IsRemovable = true;
            W2.IsRemovable = true;
            W3.IsRemovable = true;

            W1.Remove();
            W2.Remove();
            W3.Remove();
            for (int i = 0; i < Joints.Length; i++)
            {
                Joints[i].CanRemove = true;
                if (Joints[i].ConnectedWires.Count == 0)
                {
                    Joints[i].Remove();
                }
            }
            base.Remove();
        }