// タワーからの攻撃 private void OnTriggerStay(Collider other) { // Myタワー if (towerManager.Check) { if (towerManager.State == TowerManager.TowerState.Normal) { if (other.tag == "minionPC") { var pos = other.GetComponent <Transform>(); towerManager.AttackTower(pos); } if (other.tag == "UnitPC") { var pos = other.GetComponent <Transform>(); towerManager.AttackTower(pos); } } else { return; } } // Pcタワー if (!towerManager.Check) { if (towerManager.State == TowerManager.TowerState.Normal) { if (other.tag == "minion") { var pos = other.GetComponent <Transform>(); towerManager.AttackTower(pos); } if (other.tag == "Unit") { var pos = other.GetComponent <Transform>(); towerManager.AttackTower(pos); } } else { return; } } }