Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //MD5Hash:3819e52ab8bee1599d24b35b25b1102a;
- using UnityEngine;
- using System;
- public class MapGenerator : UnityEngine.MonoBehaviour
- {
- public UnityEngine.GameObject GameObject_Plane = null;
- public UnityEngine.GameObject GameObject_GroundPlaneContainer = null;
- public UnityEngine.GameObject GameObject_DesertPlaneContainer = null;
- public int Count_X = 0;
- public int Count_Y = 0;
- public int Count_Depth_X = 0;
- void Start()
- {
- int X_Position = 0;
- int Y_Position = 0;
- int XY_Cordinates = 10;
- int Depth_Position_X = 0;
- int Depth_Position_Z = 0;
- ///Generating Side Plane
- for (int i_268 = 0; i_268 < Count_X; i_268++)
- {
- ///Generating Side Plane
- ///Generating Side Plane
- X_Position = (i_268 * XY_Cordinates);
- ///Generating Side Plane
- for (int i_271 = 0; i_271 < Count_Y; i_271++)
- {
- ///Generating Side Plane
- ///Generating Side Plane
- Y_Position = (i_271 * XY_Cordinates);
- ///Generating Side Plane
- if (((Count_Y - 1) == i_271))
- {
- UnityEngine.Object.Instantiate(GameObject_GroundPlaneContainer, new UnityEngine.Vector3(X_Position, Y_Position, 0f), new UnityEngine.Quaternion(0f, 0f, 0f, 0f));
- for (int i_313 = 0; i_313 < Count_X; i_313++)
- {
- Depth_Position_X = (i_313 * XY_Cordinates);
- for (int i_315 = 0; i_315 < Count_Depth_X; i_315++)
- {
- Depth_Position_Z = (i_315 * XY_Cordinates);
- UnityEngine.Object.Instantiate(GameObject_DesertPlaneContainer, new UnityEngine.Vector3(Depth_Position_X, 0f, Depth_Position_Z), new UnityEngine.Quaternion(0f, 0f, 0f, 0f));
- }
- }
- }
- else
- {
- UnityEngine.Object.Instantiate(GameObject_Plane, new UnityEngine.Vector3(X_Position, Y_Position, 0f), new UnityEngine.Quaternion(0f, 0f, 0f, 0f));
- }
- }
- }
- }
- void Update()
- {
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement