Exemple #1
0
    private void Shoot(GameObject cannonBall, Vector3 SpawnPoint)
    {
        _animator.SetTrigger("Shoot");
        _shootSound.Play();
        cannonBall.SetActive(true);
        cannonBall.transform.position = SpawnPoint;
        CannonBall ball = cannonBall.GetComponent <CannonBall>();

        ball.SetImpulse(Vector2.right, _force);
    }