Exemplo n.º 1
0
    public void ThrowDuck(Vector3 target)
    {
        if (_duck != null)
        {
            _duck.Throw((target - _duck.transform.position).normalized * 3f);
            _animator.SetBool("grabbing", false);
            _animator.SetTrigger("throw");

            LerpUtility.Instance.TranslateTransform(
                _duck.transform,
                _duck.transform.position,
                target,
                0.25f,
                () => {
                _duck.Die();
                _duck = null;
                _gameController.PlayerStruckEngine();
            }
                );
        }
    }