示例#1
0
 public void AddPeriodicalFurniture(string name, string furnitureDirection, char axis, int offset, int step)
 {
     bool[,] map = StageConstructor.createPeriodicalMap(rct, axis, offset, step);
     for (int x = 0; x < map.GetLength(0); x++)
     {
         for (int z = 0; z < map.GetLength(1); z++)
         {
             if (map[x, z])
             {
                 addFurniture(name, new CRD(x + rct.Start.x, z + rct.Start.z), furnitureDirection);
             }
         }
     }
 }
示例#2
0
        public override void HookAddToChildElements()
        {
            surface = "Road";
            AddLayer(new NodeLayer(0, "Premetives/Surface", "Sidewalk"));
            if (parentElement.GetType() != typeof(BackgroundStreet))
            {
                AddLayer(new NodeLayer(0, "Main", "ControllQuad"));
            }
            NodeLayer lights     = new NodeLayer(getPrefabNuber(), "Additions/Pilars", "NightLight");
            int       offset     = 2;
            int       roadOffset = getRoadOffset(offset);

            lights.addMap(StageConstructor.createPeriodicalMap(rct, axis, roadOffset, 7));
            lights.hasMesh     = false;
            lights.nonWalkable = true;
            AddLayer(lights);
        }