Пример #1
0
        public void AddTileDiag(ushort tileID, ushort offset, bool side, bool vertical)
        {
            FloorTileGroup group;

            if (!GroupForTileType.TryGetValue(tileID, out group))
            {
                group = new FloorTileGroup();
                GroupForTileType[tileID] = group;
            }
            group.AddDiagIndex(offset, side, vertical);
        }
Пример #2
0
        public void AddTile(ushort tileID, ushort offset)
        {
            FloorTileGroup group;

            if (!GroupForTileType.TryGetValue(tileID, out group))
            {
                group = new FloorTileGroup();
                GroupForTileType[tileID] = group;
            }
            group.AddIndex(offset);
        }
Пример #3
0
        public FloorTileGroup AddGroup(ushort tileID)
        {
            FloorTileGroup group;

            if (tileID == 65535)
            {
                //pool tile group
                group = new Modelled3DPool(Bp);
            }
            else
            {
                group = new FloorTileGroup();
            }
            GroupForTileType[tileID] = group;
            return(group);
        }
Пример #4
0
        public int SetGrassIndices(GraphicsDevice gd, Effect e, WorldState state)
        {
            var            floor = Floors[0];
            FloorTileGroup grp   = null;

            if (!floor.GroupForTileType.TryGetValue(0, out grp))
            {
                return(0);
            }
            var dat = grp.GPUData;

            if (dat == null)
            {
                return(0);
            }
            gd.Indices = dat;
            return(dat.IndexCount / 3);
        }