Exemplo n.º 1
0
    private void OnTriggerEnter2D(Collider2D col)
    {
        Debug.Log("Pegou a colisao");
        colisor.isTrigger = false;
        HealthSystem playerLife = col.GetComponent <HealthSystem>();

        if (playerLife != null)
        {
            playerLife.Dano(dano);
        }
        StartCoroutine(ExampleCoroutine());
    }