public static Road CreateChargeTurnDown(int x, int y) { CrossTRoad r = (CrossTRoad)CreateChargeTurn(x, y, 270); r.down = true; return(r); }
public static Road CreateChargeTurnRight(int x, int y) { CrossTRoad r = (CrossTRoad)CreateChargeTurn(x, y, 0); r.right = true; return(r); }
public static Road CreateChargeTurnUp(int x, int y) { CrossTRoad r = (CrossTRoad)CreateChargeTurn(x, y, 90); r.up = true; return(r); }
public static Road CreateChargeTurnLeft(int x, int y) { CrossTRoad r = (CrossTRoad)CreateChargeTurn(x, y, 180); r.left = true; return(r); }
public static Road CreateRightT(int x, int y) { CrossTRoad r = (CrossTRoad)CreateTCrossroad(x, y, 90); r.right = true; r.up = true; r.down = true; return(r); }
public static Road CreateLeftT(int x, int y) { CrossTRoad r = (CrossTRoad)CreateTCrossroad(x, y, 270); r.left = true; r.up = true; r.down = true; return(r); }
public static Road CreateDownT(int x, int y) { CrossTRoad r = (CrossTRoad)CreateTCrossroad(x, y, 0); r.down = true; r.left = true; r.right = true; return(r); }
public static Road CreateUpT(int x, int y) { CrossTRoad r = (CrossTRoad)CreateTCrossroad(x, y, 180); r.up = true; r.left = true; r.right = true; return(r); }
public static Road CreateTCrossroad(int x, int y, float zRotation) { InitializePrefabs(); GameObject road = (GameObject)SpoofInstantiate(tcrossPrefab); road.transform.position = new Vector3(x, y, 0); road.transform.Rotate(0, 0, zRotation); CrossTRoad r = road.GetComponent <CrossTRoad>(); r.xPos = x; r.yPos = y; r.neighbourRoads = new List <Road>(); return(r); }