/// <summary> /// Raises the attack event. /// </summary> public override void OnAttack(WeaponHitbox hitbox) { if (_cameraTrack == null || _playerController == null) { _playerController = Parent.GetComponent <PlayerMovement>(); _cameraTrack = Parent.GetComponent <CameraTrack>(); } _hitbox = hitbox as BoomerangHitbox; _hitbox.StartFlight(_cameraTrack, _playerController); }
public void OnReturn() { Destroy(_hitbox.gameObject); _hitbox = null; }