Exemplo n.º 1
0
    public void DestroyPlug(bool dontRemoveFromBlock = false)
    {
        if (wire != null)
        {
            WireManager.UnwirePlug(this, wire);
        }

        Debug.Assert(block != null);

        if (!dontRemoveFromBlock)
        {
            block.RemovePlug(this);
        }

        Destroy(this.gameObject);
    }
Exemplo n.º 2
0
 public void DestroyWire()
 {
     WireManager.UnwirePlug(begin, this, false);
     WireManager.UnwirePlug(end, this, false);
     Destroy(this.gameObject);
 }