protected void Awake() { if (!instance) { instance = this; } else { throw new TooManyInstanceException("Không thể tạo quá 1 Turn Manager !"); } foreach (ReportEvent ev in Enum.GetValues(typeof(ReportEvent))) { reportCount[ev] = 0; } var c = Config.instance; maxTurnTime = c.maxTurnTimeSeconds; maxPlayerTime = c.maxPlayerTimeSeconds; }
protected void OnDestroy() { instance = null; }