Advertisement
Guest User

Untitled

a guest
Jun 26th, 2017
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.50 KB | None | 0 0
  1.     public void ChangeState (string newState)
  2.  
  3.     {
  4.  
  5.         if (stateDictionary.ContainsKey (newState)) {
  6.  
  7.             if (stateCurrent.allowedStates.ContainsKey (newState))
  8.  
  9.             {
  10.  
  11.                 print("newState == " + newState);
  12.  
  13.                 score += stateCurrent.points;
  14.  
  15.                 stateCurrent.points = stateCurrent.defaultPoints;
  16.  
  17.                 statePrevious = stateCurrent;
  18.  
  19.                 stateCurrent = stateDictionary[newState];
  20.  
  21.             } else
  22.  
  23.                 stateCurrent.points += (stateCurrent.defaultPoints * multiplier.amount);
  24.  
  25.            
  26.  
  27.         }
  28.  
  29.        
  30.  
  31.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement