Beispiel #1
0
 // Returns false if already at max drunk
 public bool DrinkBeer(int drunk_level)
 {
     if (drunkLevel >= 100)     // If somehow already at max drunk
     {
         return(false);
     }
     drunkLevel += drunk_level;
     if (drunkLevel >= startingDrunkLevel)   // Point at which to show a new drunken state
     {
         hero.EnterTheDrunk();
         StartDrunkCam();
     }
     if (drunkLevel >= 100)   // If hero just went over max drunk
     {
         StopDrunkCam();
         cameraController.RevertToDefaultRotation();
         BlackOut();
     }
     UpdateUI();
     return(true);
 }