Files
SpaceDroid/Droid 2/Assets/Rocket.cs

14 lines
301 B
C#
Raw Normal View History

2025-01-17 13:04:56 +01:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Rocket : MonoBehaviour
{
private void OnTriggerEnter(Collider other)
{
if(other.tag != "Player" && other.tag != "Floor")
Destroy(other.gameObject); // Détruit l'obstacle
}
}