Advertisement
Guest User

Untitled

a guest
Feb 10th, 2016
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.24 KB | None | 0 0
  1.  GUI.depth = -2;
  2.                                 GUI.skin = bo;
  3.                                 GUI.Box (new Rect(Screen.width/2 - Perc(25), Screen.height/2 - Perc(33), Perc(50), Perc(66)),"");
  4.                                 GUI.skin = main;
  5.                                 main.button.alignment = TextAnchor.MiddleLeft;
  6.                                 GUILayout.BeginArea(new Rect(Screen.width/2 - Perc(20), Screen.height/2 - Perc(27), Perc(50), Perc(50)));
  7.                                 ScrollPos = GUILayout.BeginScrollView(ScrollPos);
  8.                                 GUILayout.BeginVertical();
  9.                                 if (GUILayout.Button(flaxicon, GUILayout.Width(Perc(40)), GUILayout.Height(Perc(10))) && DNS.seeds>=2)
  10.                                 {
  11.                                     DNS.flax+=1;
  12.                                     DNS.seeds-=2;
  13.                                 }
  14.                                 if (GUILayout.Button(woolhat, GUILayout.Width(Perc(40)), GUILayout.Height(Perc(10))) && DNS.flax>=3)
  15.                                 {
  16.                                     DNS.winterhat+=1;
  17.                                     DNS.flax-=3;
  18.                                 }
  19.                                 if (GUILayout.Button(woolsuit, GUILayout.Width(Perc(40)), GUILayout.Height(Perc(10))) && DNS.flax>=7)
  20.                                 {
  21.                                     DNS.wintercloth+=1;
  22.                                     DNS.flax-=7;
  23.                                 }
  24.                                 if (GUILayout.Button(ironhelmet, GUILayout.Width(Perc(40)), GUILayout.Height(Perc(10))) && DNS.iron>=3)
  25.                                 {
  26.                                     DNS.helmet+=1;
  27.                                     DNS.iron-=3;
  28.                                 }
  29.                                 if (GUILayout.Button(ironcuirass, GUILayout.Width(Perc(40)), GUILayout.Height(Perc(10))) && DNS.iron>=7)
  30.                                 {
  31.                                     DNS.armorcloth+=1;
  32.                                     DNS.iron-=7;
  33.                                 }
  34.                                 if (GUILayout.Button(leatherhelmet, GUILayout.Width(Perc(40)), GUILayout.Height(Perc(10))) && DNS.leather>=3)
  35.                                 {
  36.                                     DNS.leatherhelmet+=1;
  37.                                     DNS.leather-=3;
  38.                                 }
  39.                                 if (GUILayout.Button(leathercuirass, GUILayout.Width(Perc(40)), GUILayout.Height(Perc(10))) && DNS.leather>=7)
  40.                                 {
  41.                                     DNS.leathercloth+=1;
  42.                                     DNS.leather-=7;
  43.                                 }
  44.                                 if (GUILayout.Button(bet, GUILayout.Width(Perc(40)), GUILayout.Height(Perc(10))) && DNS.wood>=5)
  45.                                 {
  46.                                     DNS.betcount+=1;
  47.                                     DNS.wood-=5;
  48.                                 }
  49.                                 if (GUILayout.Button(sword, GUILayout.Width(Perc(40)), GUILayout.Height(Perc(10))) && DNS.iron>=3)
  50.                                 {
  51.                                     DNS.swords+=1;
  52.                                     DNS.iron-=3;
  53.                                 }
  54.                                 GUILayout.EndVertical();
  55.                                
  56.                                 GUILayout.EndScrollView();
  57.                                 GUILayout.EndArea();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement