Ejemplo n.º 1
0
    void OnCollisionExit(Collision coll)
    {
        manipulator o = coll.transform.GetComponent <manipulator>();

        if (o != null)
        {
            o.toggleMultiselect(false, this);
            if (activePreviews.ContainsKey(o))
            {
                Destroy(activePreviews[o]);
                activePreviews.Remove(o);
            }
        }
    }
Ejemplo n.º 2
0
    void OnCollisionEnter(Collision coll)
    {
        manipulator o = coll.transform.GetComponent <manipulator>();

        if (o != null)
        {
            o.toggleMultiselect(true, this);

            if (activePreviews.ContainsKey(o))
            {
                Destroy(activePreviews[o]);
            }
            activePreviews[o] = Instantiate(eventPreviewPrefab, transform.parent, false);
            Vector3 s = activePreviews[o].transform.localScale;
            s.y = _interface._gridParams.trackHeight;
            s.x = _interface._gridParams.unitSize / _interface._gridParams.snapFraction;
            activePreviews[o].transform.localScale = s;
        }
    }