private void OnTriggerEnter(Collider other) { PlayerBase playerBase = other.GetComponent <PlayerBase>(); if (playerBase != null) { playerBase.Damage(attack); } }
public void AttackBase() { _targetBase?.Damage(EnemyType.Damage); }