예제 #1
0
    // Detect Enemy Collision
    // Detect Item Collision
    private void OnTriggerEnter2D(Collider2D collision)
    {
        if (collision.CompareTag("Enemy") == true)
        {
            player.GetDamaged();
        }

        //if(collision.tag == "EditorOnly")
        //{
        //    ItemManager item = collision.GetComponent<ItemManager>();
        //    item.Use();
        //}
        //Debug.Log(" T : " + collision.name);
    }