Exemple #1
0
        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;
        }
Exemple #2
0
 protected void OnDestroy()
 {
     instance = null;
 }