using System.Collections; using System.Collections.Generic; using UnityEngine; // Addon pour les textes améliorés using TMPro; // Gestion des scenes using UnityEngine.SceneManagement; public class GameManager : MonoBehaviour { private RoomManager _roomManager; public TextMeshProUGUI textMeshID; public GameObject room; public static float motiv; public static float difficulty; public static int fame; public static bool stop = false; // Start is called before the first frame update void Start() { _roomManager = this.room.GetComponent<RoomManager>(); updateID(_roomManager.actualRoom, _roomManager.actualRoomColor ); } // Update is called once per frame void Update() { } // Update textMeshID public void updateID(string newID) { textMeshID.text = "ID : " + newID; } // Update textMeshID + Room public void updateID(string newID, Color roomColor) { textMeshID.text = "ID : " + newID; room.GetComponent<Renderer>().material.color = roomColor; } }