示例#1
0
        public void addRoad(long tilex, long tiley, CardinalDirection direction)
        {
            switch (direction)
            {
            case CardinalDirection.East:
            {
                clsRoadWorldTile road = new clsRoadWorldTile(clsRoadWorldTile.getDirections(true, false, false, false), 55);
                base.addTile(road, tilex, tiley);
                break;
            }

            case CardinalDirection.West:
            {
                clsRoadWorldTile road = new clsRoadWorldTile(clsRoadWorldTile.getDirections(false, true, false, false), 55);
                base.addTile(road, tilex, tiley);
                break;
            }

            case CardinalDirection.North:
            {
                clsRoadWorldTile road = new clsRoadWorldTile(clsRoadWorldTile.getDirections(false, false, true, false), 35);
                base.addTile(road, tilex, tiley);
                break;
            }

            case CardinalDirection.South:
            {
                clsRoadWorldTile road = new clsRoadWorldTile(clsRoadWorldTile.getDirections(false, false, false, true), 35);
                base.addTile(road, tilex, tiley);
                break;
            }
            }
        }
示例#2
0
        public void addIntersection(long tilex, long tiley, bool east, bool west, bool north, bool south)
        {
            clsRoadWorldTile intersection = new clsRoadWorldTile(clsRoadWorldTile.getDirections(east, west, north, south), 35);

            base.addTile(intersection, tilex, tiley);
        }
示例#3
0
        /*****************************************
        *       Instance Objects in the world
        *****************************************/

        public void addGrass(long tilex, long tiley)
        {
            clsRoadWorldTile grass = new clsRoadWorldTile(new List <Vector2>(), 0);

            base.addTile(grass, tilex, tiley);
        }