using UnityEngine;
using VContainer;

public class JumpingBall : MonoBehaviour
{
    public float jumpforce = 4f;
    public Rigidbody BallRb;

    void Start()
    {
        if(BallRb==null)
        {
            BallRb = GetComponent<Rigidbody>();
        }
    }

    void OnCollisionEnter(Collision collision)
    {
        if(collision.collider.CompareTag("Platform"))
        {
            BallRb.linearVelocity = new Vector3(0, jumpforce, 0);
        }
    }

}
