Advertisement
Guest User

Untitled

a guest
Apr 5th, 2016
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.85 KB | None | 0 0
  1. private Rect Position
  2. {
  3. get
  4. {
  5. int posX = Screen.width - Texture.Background.width;
  6.  
  7. // mirror to the left side on the tracking station
  8. if (this.onTrackingStation)
  9. {
  10. posX = 241;
  11. }
  12.  
  13. return new Rect(posX,
  14. Screen.height - Texture.Background.height,
  15. Texture.Background.width,
  16. Texture.Background.height);
  17. }
  18. }
  19.  
  20. private Rect PositionSatellite
  21. {
  22. get
  23. {
  24. var width = 350;
  25. var height = 350;
  26. var posX = Screen.width - width;
  27.  
  28. // mirror to the left side on the tracking station
  29. if (this.onTrackingStation)
  30. {
  31. posX = 241;
  32. }
  33.  
  34. return new Rect(posX,
  35. Screen.height - height - Position.height,
  36. width,
  37. height);
  38. }
  39. }
  40.  
  41. private Rect PositionAntenna
  42. {
  43. get
  44. {
  45. var positionSatellite = PositionSatellite;
  46. var width = 350;
  47. var height = 350;
  48. var posX = PositionSatellite.x - width;
  49.  
  50. // mirror to the left side on the tracking station
  51. if (this.onTrackingStation)
  52. {
  53. posX = PositionSatellite.x + PositionSatellite.width;
  54. }
  55.  
  56. return new Rect(posX,
  57. Screen.height - height,
  58. width,
  59. height);
  60. }
  61. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement