예제 #1
0
    private void OnTriggerEnter2D(Collider2D collision)
    {
        if (collision.CompareTag("Player"))
        {
            Destroy(destroyObject);

            DataPlayerChange playerStam = collision.transform.GetComponent <DataPlayerChange>();
            playerStam.UseStam(30);
        }
    }
    private void OnTriggerEnter2D(Collider2D collision)
    {
        if (collision.CompareTag("Player"))
        {
            Boss_Health boss_Health = GameObject.FindGameObjectWithTag("Boss").GetComponent <Boss_Health>();
            boss_Health.TakeDamage(40);

            DataPlayerChange playerStam = collision.transform.GetComponent <DataPlayerChange>();
            playerStam.UseStam(30);
        }
    }