Advertisement
Guest User

Unity C# Level Script 3

a guest
Feb 5th, 2019
531
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.50 KB | None | 0 0
  1.     void TreasureCollected()
  2.     {
  3.         collected++;
  4.         if (collected == numTreasures)
  5.         {
  6.             levelComplete = true;
  7.         }
  8.     }
  9.  
  10.     bool LevelEndMessage(string message, string buttonText)
  11.     {
  12.         GUI.skin.label.alignment = TextAnchor.MiddleCenter;
  13.         GUI.Label(new Rect(Screen.width / 2 - 200 / 2, Screen.height / 2 - 75, 200, 50), message);
  14.         return GUI.Button(new Rect(Screen.width / 2 - 200 / 2, Screen.height / 2 + 25, 200, 50), buttonText);
  15.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement