Exemplo n.º 1
0
    //**************************************************************
    //  collisions raise static events Mainhandtouched blah and offhandtouched blah
    //**************************************************************
    private void OnTriggerEnter(Collider other)
    {
        // Debug.Log(" collision "+ this.gameObject.name + "->OntrigEnt-> " + other.gameObject.name);

        if (Mytype == ARZHandType.HandGun)
        {
            StemKitMNGR.MAINHandTouchedThisThing(other.gameObject.tag);
        }
        else
        if (Mytype == ARZHandType.HandMag)
        {
            if (other.gameObject.tag == "Ammo")
            {
                StemKitMNGR.OffHandTouchedThisThing(other.gameObject.tag);
            }
            if (MyBun.IsMyThingShowing())
            {
                StemKitMNGR.OffHandTouchedThisThing(other.gameObject.tag);
            }
        }
        else
        {
            Debug.Log(" collision but no type set");
        }
    }