public virtual void Start()
    {
        this.p       = UserAtom.p;
        this.n       = UserAtom.n;
        this.display = (NucleusDisplay)this.GetComponent(typeof(NucleusDisplay));
        GameObject chObj = new GameObject("Colliders");

        this.colliderParent          = chObj.transform;
        this.colliderParent.position = this.transform.position;
        this.colliderParent.parent   = this.transform;
        this.CopyPoints();
        this.colliders = new GameObject[this.points.Length];
        int i = 0;

        while (i < this.points.Length)
        {
            GameObject cObj = new GameObject("Collider");
            cObj.transform.parent        = this.colliderParent;
            cObj.transform.localPosition = this.points[i].pos;
            SphereCollider coll = (SphereCollider)cObj.AddComponent(typeof(SphereCollider));
            coll.radius = this.colliderRadius;
            DraggableCollider script = (DraggableCollider)cObj.AddComponent(typeof(DraggableCollider));
            script.id         = i;
            script.parent     = this;
            this.colliders[i] = cObj;
            i++;
        }
        this.Rebuild();
    }
    public static void Add(DraggableCollider d)
    {
        DraggableCollider[] newDraggables = new DraggableCollider[DragNDrop.colliders.Length + 1];
        int i = 0;

        while (i < DragNDrop.colliders.Length)
        {
            newDraggables[i] = DragNDrop.colliders[i];
            i++;
        }
        newDraggables[DragNDrop.colliders.Length] = d;
        DragNDrop.colliders = newDraggables;
    }
    public virtual void Start()
    {
        DraggableCollider coll = (DraggableCollider)this.gameObject.AddComponent(typeof(DraggableCollider));

        coll.id     = 0;
        coll.parent = this;
        foreach (Transform t in this.transform)
        {
            this.strongForceRegion = t;
        }
        coll        = (DraggableCollider)this.strongForceRegion.gameObject.AddComponent(typeof(DraggableCollider));
        coll.id     = 1;
        coll.parent = this;
    }
    public static void Remove(DraggableCollider d)
    {
        DraggableCollider[] newDraggables = new DraggableCollider[DragNDrop.colliders.Length - 1];
        int added = 0;
        int i     = 0;

        while (i < DragNDrop.colliders.Length)
        {
            if (DragNDrop.colliders[i] != d)
            {
                newDraggables[added] = DragNDrop.colliders[i];
                added++;
            }
            i++;
        }
        DragNDrop.colliders = newDraggables;
    }
    public virtual void Update()
    {
        RaycastHit hit     = default(RaycastHit);
        Vector2    newSize = new Vector2(Screen.width, Screen.height);

        if (!DragNDrop.myActive)
        {
            return;
        }
        int               i             = 0;
        float             oldY          = Screen.height;
        Vector2           mousePosition = new Vector2(Input.mousePosition.x, Screen.height - Input.mousePosition.y) * (newSize.y / oldY);
        DraggableCollider curCollider   = null;

        i = 0;
        while (i < DragNDrop.colliders.Length)
        {
            if (((DragNDrop.colliders[i].guiRect.width != 0) && (!curCollider || (curCollider.guiZ <= DragNDrop.colliders[i].guiZ))) && DragNDrop.colliders[i].guiRect.Contains(mousePosition))
            {
                curCollider = DragNDrop.colliders[i];
            }
            i++;
        }
        if (!curCollider)
        {
            if (Physics.Raycast(Camera.main.ScreenPointToRay(Input.mousePosition), out hit))
            {
                curCollider = (DraggableCollider)hit.collider.gameObject.GetComponent(typeof(DraggableCollider));
            }
        }
        if (this.lastInsideCollider && (curCollider != this.lastInsideCollider))
        {
            this.lastInsideCollider.inside = false;
            DragNDrop.current = this.lastInsideCollider.parent.OnDragEvent(DragEventType.Exit, this.lastInsideCollider.id, DragNDrop.current, curCollider ? curCollider.parent : null);
        }
        if (curCollider)
        {
            if (!curCollider.inside)
            {
                curCollider.inside = true;
                DragNDrop.current  = curCollider.parent.OnDragEvent(DragEventType.Over, curCollider.id, DragNDrop.current, curCollider.parent);
            }
            if (!curCollider.clicked && Input.GetMouseButtonDown(0))
            {
                curCollider.clicked = true;
                DragNDrop.current   = curCollider.parent.OnDragEvent(DragEventType.Down, curCollider.id, DragNDrop.current, curCollider.parent);
                this.downCollider   = curCollider;
            }
        }
        if (this.downCollider && Input.GetMouseButtonUp(0))
        {
            this.downCollider.clicked = false;
            DragNDrop.current         = this.downCollider.parent.OnDragEvent(DragEventType.Up, this.downCollider.id, DragNDrop.current, curCollider ? curCollider.parent : null);
            this.downCollider         = null;
        }
        this.lastInsideCollider = curCollider;
        if (DragNDrop.current)
        {
            DragNDrop.current.position = mousePosition;
        }
    }