using System.Collections.Generic; using UnityEngine; public class TriggerMovingPlatforme : MonoBehaviour { public List _ListObjectToDisable; private List _ListPlatforme = new List(); public void Init(MovingPlatforme plateforme) { _ListPlatforme.Add(plateforme); } public void ActiveObstacle() { foreach (MovingPlatforme platforme in _ListPlatforme) { platforme.Activate(active: true); } foreach (GameObject obj in _ListObjectToDisable) { obj.SetActive(false); } } }