private void OnTriggerEnter2D(Collider2D collider) { AttackableBase attackable = collider.gameObject.GetComponent <AttackableBase>(); if (attackable != null) { attackable.OnAttacked(WeaponType, _weaponCollider); } }