Exemplo n.º 1
0
    void OnTriggerEnter(Collider other)
    {
        Debug.Log("hit coin");
        if (other.gameObject.tag == "Projectile")
        {
            Material mat = GetComponent <Renderer>().material;
            Debug.Log("hi");
            Destroy(gameObject);

            MissionDemolition.CoinGotten();
        }
    }