using UnityEngine;

public class Meteor : MonoBehaviour
{
    public float fallSpeed = 2f; // Vitesse de chute

    void Update()
    {
        // Déplace la météorite uniquement vers le bas
        transform.position += Vector3.down * fallSpeed * Time.deltaTime;
    }

    private void OnCollisionEnter(Collision collision)
    {
        // Détruit l'objet touché
        Debug.Log($"{collision.gameObject.name} destroyed by Meteorite!");
        Destroy(collision.gameObject);
    }
}