CopyPastehas never been so tasty!

dfsdfs

by anonymous

  • 0
  • 0
  • 0
150 views

private Rect WindowRect = new Rect(0,0,Screen.width ,Screen.height );

void OnGUI() { if(isShopping) WindowRect = GUI.Window(WindowID,WindowRect,function,"                   Shop",ShopWindowStyle); }            void function(int ID) { #region ExitButton if(GUI.Button(new Rect(WindowRect.width -45,5,40,30),"Exit")) { AudioSource.PlayClipAtPoint(GoodBye,GameObject.Find("Body").transform.position); isShopping = false; } #endregion #region AmmoButton if(GUI.Button(new Rect(90,479,60,30)," Ammo ")) if(Money.MONEY_PLAYER >= Ammo_cost) { AudioSource.PlayClipAtPoint(cashPay,GameObject.Find("Body").transform.position); Money.MONEY_PLAYER -= Ammo_cost; MachineGun.MACHINE_GUN_CLIPS += 1; } else { AudioSource.PlayClipAtPoint(cashPayCant,GameObject.Find("Body").transform.position); } #endregion if(GUI.Button(new Rect(379,479,60,30),"Buy")) if(Money.MONEY_PLAYER >= Ammo_cost) { AudioSource.PlayClipAtPoint(cashPay,GameObject.Find("Body").transform.position); Money.MONEY_PLAYER -= Ammo_cost; MachineGun.MACHINE_GUN_CLIPS += 1; } else { AudioSource.PlayClipAtPoint(cashPayCant,GameObject.Find("Body").transform.position); }

Add A Comment: