コード例 #1
0
    void OnTriggerEnter(Collider other)
    {
        if (other.CompareTag("Enemy"))
        {
            if (gameObject.name == "MainTower")
            {
                death.StartExplosion();
            }

            if (isActive)
            {
                other.GetComponent <Enemy>().Explode();
            }
            Die();
        }
    }