public static Road CreateEndDown(int x, int y) { EndRoad r = (EndRoad)CreateEnd(x, y, 90); r.down = true; return(r); }
public static Road CreateEndRight(int x, int y) { EndRoad r = (EndRoad)CreateEnd(x, y, 180); r.right = true; return(r); }
public static Road CreateEndUp(int x, int y) { EndRoad r = (EndRoad)CreateEnd(x, y, 270); r.up = true; return(r); }
public static Road CreateEndLeft(int x, int y) { EndRoad r = (EndRoad)CreateEnd(x, y, 0); r.left = true; return(r); }
public static Road CreateEnd(int x, int y, float zRotation) { InitializePrefabs(); GameObject road = (GameObject)SpoofInstantiate(endPrefab); road.transform.position = new Vector3(x, y, 0); EndRoad r = road.GetComponent <EndRoad>(); r.transform.Rotate(0, 0, zRotation); r.xPos = x; r.yPos = y; r.neighbourRoads = new List <Road>(); return(r); }