using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Launch : MonoBehaviour {

    [SerializeField] GameObject tambourine;

    [SerializeField] private float horizSpeed;
    [SerializeField] private float vertSpeed;

    public void ThrowTambourine(float facing) {
        GameObject newTambourine = Instantiate(tambourine, this.gameObject.transform.position, this.gameObject.transform.rotation);
        // multiply horizSpeed by facing if not using moving launch point
        newTambourine.GetComponent<Rigidbody2D>().AddForce(new Vector2(horizSpeed * facing, vertSpeed), ForceMode2D.Impulse);
    }
}
