Advertisement
Guest User

Untitled

a guest
Apr 20th, 2014
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. if (!FB.IsLoggedIn) {
  2. //START
  3. if (GUI.Button(new Rect(Screen.width * 0.55f, Screen.height * 0.7f, Screen.height * 0.2f * (float)1920/700, Screen.height * 0.2f), "", "Enter"))
  4. {
  5. if (!FB.IsLoggedIn) {
  6. Init.Start();
  7. }
  8. }
  9. return;
  10. }
  11.  
  12. if (!FB.IsLoggedIn) {
  13. //START
  14. if (GUI.Button(new Rect(Screen.width * 0.55f, Screen.height * 0.7f, Screen.height * 0.2f * (float)1920/700, Screen.height * 0.2f), "", "Enter"))
  15. Init.Start();
  16. return;
  17. }
  18.  
  19. public static void Start(){
  20. FB.Init(OnInitComplete, OnHideUnity);
  21. }
  22.  
  23. private static void OnInitComplete()
  24. {
  25. dMsg += "FB.Init completed: Is user logged in? " + FB.IsLoggedIn;
  26. if (!FB.IsLoggedIn) FB.Login(); //<--- Magic login code! :P
  27. isInit = true;
  28. }
  29.  
  30. private static void OnHideUnity(bool isGameShown)
  31. {
  32. dMsg += "Is game showing? " + isGameShown;
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement