26 lines
543 B
C#
26 lines
543 B
C#
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class TriggerMovingPlatforme : MonoBehaviour
|
|
{
|
|
public List<GameObject> _ListObjectToDisable;
|
|
|
|
private List<MovingPlatforme> _ListPlatforme = new List<MovingPlatforme>();
|
|
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);
|
|
}
|
|
}
|
|
}
|