コード例 #1
0
 public void RefreshSnackCount()
 {
     // Clear my own count.
     SnackCount.ZeroCounts();
     // Refresh counts for all my rooms, and add 'em to MY count!
     for (int r = 0; r < rooms.Count; r++)
     {
         rooms[r].RefreshSnackCount();
         SnackCount.Add(rooms[r].SnackCount);
     }
 }
コード例 #2
0
 // ----------------------------------------------------------------
 //  Doers
 // ----------------------------------------------------------------
 public void RefreshSnackCountGame()
 {
     // Zero my count.
     SnackCountGame.ZeroCounts();
     // Add SnackCounts from every cluster in every world!
     for (int w = 0; w < worldDatas.Count; w++)
     {
         for (int c = 0; c < worldDatas[w].clusters.Count; c++)
         {
             SnackCountGame.Add(worldDatas[w].clusters[c].SnackCount);
         }
     }
     if (!GameManagers.IsInitializing)
     {
         GameManagers.Instance.EventManager.OnSnackCountGameChanged();
     }
 }