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

[RequireComponent(typeof(Rigidbody))]
public class Yeetable : MonoBehaviour, IPokeable
{
    public float upForce = 20f;

    private Rigidbody rigid;

    // Start is called before the first frame update
    void Start()
    {
        rigid = this.GetComponent<Rigidbody>();
    }

    // Update is called once per frame
    void Update()
    {
        
    }

    public void sendMessage(string message)
    {
        if (message == "grabbed")
        {
            rigid.isKinematic = false;
            rigid.AddForce(new Vector3(0, upForce, 0), ForceMode.Impulse);
        }
    }
}
