Skip to content
Snippets Groups Projects
Commit d58a7af6 authored by zohaib's avatar zohaib
Browse files

Added class attribute for citygen

parent e778721f
Branches
No related tags found
No related merge requests found
......@@ -4,6 +4,71 @@ using UnityEngine;
public class CityGen : MonoBehaviour {
[System.Serializable]
public class Pin {
public Vector2 position;
public Vector2 radius;
}
[System.Serializable]
public class ZoneType {
public string zoneName;
[HideInInspector]
public int prefabsIndex;
public GameObject[] prefabs;
public Pin[] pins;
}
[System.Serializable]
public class Prefab {
[HideInInspector]
public int identifiers;
public Vector2 footprints;
public Vector2 offsetForFootprint;
}
[System.Serializable]
public class LayoutDimension {
public int width;
public int height;
}
[System.Serializable]
public class Tile {
public int height;
public int prefab;
public Transform transform;
}
[System.Serializable]
public class City {
public ZoneType[] zoneTypes;
public Prefab[] prefabs;
public LayoutDimension layoutDimension;
[HideInInspector]
public int[][] layout;
public Tile[] tiles;
/*
City() {
tiles = new Tile[layout.height * layout.width];
} */
void genDemo(){
}
void save(){
}
void load(){
}
}
public City city;
// Use this for initialization
void Start () {
......
......@@ -36,7 +36,7 @@
},{
"Identifiers":[
2,
11
0
],
"Footprint":[
[0, 0, 0],
......@@ -47,7 +47,7 @@
},{
"Identifiers":[
3,
13
-3
],
"Footprint":[
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment