private void Awake() { if (instance) { Destroy(this); return; } instance = this; nouvelleCouleur.tag = couleurTemp.tag = (Couleur.ColorTag)Random.Range(0, 8); }
private void OnTriggerEnter(Collider c) { if (!ecranSpawner) { ecranSpawner = EcranSpawner.instance; } if (c.CompareTag("Player")) { ecranSpawner.pointsDeSpawn = pointsDeSpawnSuivants; ecranSpawner.terrainParent = transform.parent; ecranSpawner.SpawnEcrans(); ObjectPooler.instance.SpawnFromPool(terrainPrefab.name.Replace("(Clone)", null), pointsDeSpawnTerrainSuivant.position, pointsDeSpawnTerrainSuivant.rotation, ecranSpawner.pointDeRotationTerrain); } }
// Start is called before the first frame update void Start() { ecranSpawner = EcranSpawner.instance; }