SplitScreenDemo.cs 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. //This asset was uploaded by https://unityassetcollection.com
  2. /// ProFlares - v1.08 - Copyright 2014-2015 All rights reserved - ProFlares.com
  3. using UnityEngine;
  4. using System.Collections;
  5. public class SplitScreenDemo : MonoBehaviour {
  6. // Use this for initialization
  7. void Start () {
  8. }
  9. // Update is called once per frame
  10. void Update () {
  11. }
  12. public Camera guiCamera;
  13. public Texture2D Logo;
  14. public Texture2D Info;
  15. void OnGUI(){
  16. GUI.color = Color.white;
  17. GUIStyle LogoStyle = new GUIStyle();
  18. LogoStyle.active.background = Logo;
  19. LogoStyle.normal.background = Logo;
  20. LogoStyle.richText = true;
  21. LogoStyle.alignment = TextAnchor.MiddleCenter;
  22. LogoStyle.normal.textColor = Color.white;
  23. if(GUI.Button(new Rect(10,0,Logo.width,Logo.height),"",LogoStyle)){
  24. Application.OpenURL("http://proflares.com/store");
  25. }
  26. GUIStyle styleInfo = new GUIStyle();
  27. styleInfo.active.background = Info;
  28. styleInfo.normal.background = Info;
  29. styleInfo.richText = true;
  30. styleInfo.alignment = TextAnchor.MiddleCenter;
  31. styleInfo.normal.textColor = Color.white;
  32. if(GUI.Button(new Rect((guiCamera.pixelRect.width*0.5f)-(Info.width*0.5f),guiCamera.pixelRect.height*2-Info.height,Info.width,Info.height),"",styleInfo)){
  33. //Application.OpenURL("http://proflares.com/store");
  34. }
  35. }
  36. }