Esempio n. 1
0
 internal void reset() {
     for (int i = 0; i < readyReports.Count; i++) {
         readyReports[i].status = 0;
     }
     readyReports.Clear();
     reporting = null;
 }
Esempio n. 2
0
		public void loadNews(JSONNode h) {
            report = GetComponent<NewsReport>();
            NewsCondition cond;
            foreach (JSONNode item in h.Childs) {
                cond = new NewsCondition(item);
                report.reports.Add(cond);
            }
        }
Esempio n. 3
0
 private void setReport() {
     int c = 0;
     for (int i = 0; i < reports.Count; i++) {
         c = reports[i].status;
         reports[i].update();
         if (c != reports[i].status) {
             if (reports[i].status == 1)
                 readyReports.Add(reports[i]);
             else
                 readyReports.Remove(reports[i]);
         }
     }
     if (readyReports.Count > 0)
         reporting = readyReports[Random.Range(0, readyReports.Count - 1)];
     else
         reporting = null;
 }