Advertisement
diegographics

Untitled

Apr 3rd, 2017
509
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.81 KB | None | 0 0
  1. //MD5Hash:3819e52ab8bee1599d24b35b25b1102a;
  2. using UnityEngine;
  3. using System;
  4.  
  5.  
  6. public class MapGenerator : UnityEngine.MonoBehaviour
  7. {
  8. public UnityEngine.GameObject GameObject_Plane = null;
  9. public UnityEngine.GameObject GameObject_GroundPlaneContainer = null;
  10. public UnityEngine.GameObject GameObject_DesertPlaneContainer = null;
  11. public int Count_X = 0;
  12. public int Count_Y = 0;
  13. public int Count_Depth_X = 0;
  14.  
  15.  
  16. void Start()
  17. {
  18. int X_Position = 0;
  19. int Y_Position = 0;
  20. int XY_Cordinates = 10;
  21. int Depth_Position_X = 0;
  22. int Depth_Position_Z = 0;
  23.  
  24. ///Generating Side Plane
  25. for (int i_268 = 0; i_268 < Count_X; i_268++)
  26. {
  27. ///Generating Side Plane
  28. ///Generating Side Plane
  29. X_Position = (i_268 * XY_Cordinates);
  30. ///Generating Side Plane
  31. for (int i_271 = 0; i_271 < Count_Y; i_271++)
  32. {
  33. ///Generating Side Plane
  34. ///Generating Side Plane
  35. Y_Position = (i_271 * XY_Cordinates);
  36. ///Generating Side Plane
  37. if (((Count_Y - 1) == i_271))
  38. {
  39. UnityEngine.Object.Instantiate(GameObject_GroundPlaneContainer, new UnityEngine.Vector3(X_Position, Y_Position, 0f), new UnityEngine.Quaternion(0f, 0f, 0f, 0f));
  40. for (int i_313 = 0; i_313 < Count_X; i_313++)
  41. {
  42. Depth_Position_X = (i_313 * XY_Cordinates);
  43. for (int i_315 = 0; i_315 < Count_Depth_X; i_315++)
  44. {
  45. Depth_Position_Z = (i_315 * XY_Cordinates);
  46. UnityEngine.Object.Instantiate(GameObject_DesertPlaneContainer, new UnityEngine.Vector3(Depth_Position_X, 0f, Depth_Position_Z), new UnityEngine.Quaternion(0f, 0f, 0f, 0f));
  47. }
  48. }
  49. }
  50. else
  51. {
  52. UnityEngine.Object.Instantiate(GameObject_Plane, new UnityEngine.Vector3(X_Position, Y_Position, 0f), new UnityEngine.Quaternion(0f, 0f, 0f, 0f));
  53. }
  54.  
  55. }
  56. }
  57. }
  58. void Update()
  59. {
  60. }
  61. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement