Exemplo n.º 1
0
    private void OnCollisionExit(Collision coll)
    {
        OdourParticle op = coll.gameObject.GetComponent <OdourParticle>();

        if (op == null)
        {
            return;
        }
        int id = op.parent;

        odourDictionary.Remove(id);
    }
Exemplo n.º 2
0
    //add the colliding objects that have the OdourParticle component attached
    private void OnTriggerEnter(Collider coll)
    {
        GameObject    obj = coll.gameObject;
        OdourParticle op  = obj.GetComponent <OdourParticle>();

        if (op == null)
        {
            return;
        }
        int objId = obj.GetInstanceID();

        particles.Add(objId, obj);
        UpdateTarget();
    }