Esempio n. 1
0
 public void UpdateSceneRandomly()
 {
     if (this.SceneList.Length != 0)
     {
         int[] rates = new int[this.SceneList.Length];
         for (int i = 0; i < this.SceneList.Length; i++)
         {
             rates[i] = this.SceneList[i].ChooseRate;
         }
         this._sceneId = ConfigAtmosphereUtil.ChooseRandomly(rates);
     }
 }
Esempio n. 2
0
 public int GetSceneIdRandomly()
 {
     if (this.SceneList.Length == 0)
     {
         return(0);
     }
     int[] rates = new int[this.SceneList.Length];
     for (int i = 0; i < this.SceneList.Length; i++)
     {
         rates[i] = this.SceneList[i].ChooseRate;
     }
     return(ConfigAtmosphereUtil.ChooseRandomly(rates));
 }