Exemplo n.º 1
0
    protected bool OnCollisionEvent(Fixture fixtureA, Fixture fixtureB, Contact contact)
    {
        PlayerStats pStats = fixtureB.Body.UserFSBodyComponent.gameObject.GetComponent <PlayerStats>();

        if (pStats != null)
        {
            pStats.AddAmmoCount(ammoValue, weaponType);
            GameObject.Destroy(gameObject);
            return(false);
        }
        else if (fixtureB.Body.IsStatic == true)
        {
            return(true);
        }
        else
        {
            return(false);
        }
    }