예제 #1
0
 public void ChangeTime(int minute)
 {
     this.minute += minute;
     player.drink(-(int)((double)minute * 1 / 6));             //Drunk level decreases by the amount of minutes passed
     while (this.minute >= 60 || this.hour == 24)              //!Note! If only 5 minutes passes it doesnt decrease.
     {
         if (this.minute >= 60)
         {
             this.minute -= 60;                                  //Every hour in Africa an hour passes
             this.hour++;                                        // Have some fun if you are drunk
             player.haveFun(-10);                                // Fun level decreases over time
             score += (player.getfunLevel()) / 2;
         }
         if (this.hour == 24)
         {
             this.hour = 0;
         }
     }
 }
예제 #2
0
 /// <summary>
 /// Used to manipulate time. Decreases drunkLevel and funLevel as time passes, and changes SkyBox
 /// to become darker as it gets late.
 /// </summary>
 /// <param name="minute">How many minutes have passed</param>
 public void ChangeTime(int minute)
 {
     this.minute += minute;
     player.drink(-((double)minute * 1 / 6)); //Drunk level decreases by the amount of minutes passed
     while (this.minute >= 60 || this.hour == 24)
     {
         iManager.OpenPopUp("Another hour has passed.");
         controller.ChangeSkyBox(hour);
         if (this.minute >= 60)
         {
             this.minute -= 60;
             this.hour++;                // Have some fun if you are drunk
             player.haveFun(-10);        // Fun level decreases over time
             score += (player.getfunLevel()) / 2;
         }
         if (this.hour == 24)
         {
             this.hour = 0;
         }
     }
 }