Exemple #1
0
    public static Road CreateChargeTurnDown(int x, int y)
    {
        CrossTRoad r = (CrossTRoad)CreateChargeTurn(x, y, 270);

        r.down = true;
        return(r);
    }
Exemple #2
0
    public static Road CreateChargeTurnRight(int x, int y)
    {
        CrossTRoad r = (CrossTRoad)CreateChargeTurn(x, y, 0);

        r.right = true;
        return(r);
    }
Exemple #3
0
    public static Road CreateChargeTurnUp(int x, int y)
    {
        CrossTRoad r = (CrossTRoad)CreateChargeTurn(x, y, 90);

        r.up = true;
        return(r);
    }
Exemple #4
0
    public static Road CreateChargeTurnLeft(int x, int y)
    {
        CrossTRoad r = (CrossTRoad)CreateChargeTurn(x, y, 180);

        r.left = true;
        return(r);
    }
Exemple #5
0
    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);
    }
Exemple #6
0
    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);
    }
Exemple #7
0
    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);
    }
Exemple #8
0
    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);
    }
Exemple #9
0
    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);
    }