Exemplo n.º 1
0
    /// <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);
    }
Exemplo n.º 2
0
 public void OnReturn()
 {
     Destroy(_hitbox.gameObject);
     _hitbox = null;
 }