Exemplo n.º 1
0
    void OnTriggerEnter(Collider collision)
    {
        print("collision with trigger w tag: " + collision.gameObject.tag);
        if (collision.gameObject.tag.Equals("Seal"))
        {
            //we've hit a seal!
            Destroy(collision.gameObject);
            gameHandler.AddPoint(playerNumber);
        }

        if (collision.gameObject.CompareTag("KillBox"))
        {
            state = STATE.FALLING;
            gameObject.GetComponent <BoxCollider>().enabled = false;
            extraFall = true;
        }
    }