WhoWonChallengeScreen.cs 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. using UnityEngine;
  2. using System.Collections.Generic;
  3. #if UNITY_ANDROID
  4. //using FacebookAccess = Prime31.FacebookAndroid;
  5. #elif UNITY_IPHONE
  6. using FacebookAccess = WrapperFB;
  7. #elif UNITY_WEBPLAYER
  8. using FacebookAccess = FacebookWeb;
  9. #endif
  10. [RequireComponent(typeof(ScreenBase))]
  11. public class WhoWonChallengeScreen : ChallengeResultItem
  12. {
  13. //ChallengeResultUIData _data;
  14. ScreenBase _screenBase;
  15. void Awake()
  16. {
  17. _screenBase = GetComponent<ScreenBase>();
  18. }
  19. void OnOkButtonMsg()
  20. {
  21. _screenBase.Hide();
  22. }
  23. void OnShareButtonMsg()
  24. {
  25. /*var parameters = new Dictionary<string,object>
  26. {
  27. { "to", _data.otherFacebookId },
  28. { "link", GameConstants.PLAY_GAME_URL },
  29. { "name", Localization.instance.Get("facebook.shareChallengeWon.linkName") },
  30. { "picture", GameConstants.FACEBOOK_POST_IMAGE },
  31. { "caption", Localization.instance.Get("facebook.shareChallengeWon.imageCaption") },
  32. { "description", Localization.instance.Get("facebook.shareChallengeWon.description")},
  33. { "actions", "[ { 'name': '"+Localization.instance.Get("facebook.shareChallengeWon.play")+"', 'link': '"+GameConstants.PLAY_GAME_URL+"'} ]" }
  34. };*/
  35. //FacebookAccess.showFacebookShareDialog( parameters );
  36. _screenBase.Hide();
  37. }
  38. public override void SetData(ChallengeResultUIData data)
  39. {
  40. //_data = data;
  41. base.SetData(data);
  42. }
  43. }