コード例 #1
0
        public override BoundingBox[] GetCustomCollisionBoxes(SubsystemTerrain terrain, int value)
        {
            int data       = Terrain.ExtractData(value);
            int face       = BottomSuckerBlock.GetFace(data);
            int subvariant = BottomSuckerBlock.GetSubvariant(data);

            return(m_collisionBoxes[4 * face + subvariant]);
        }
コード例 #2
0
        public override void GenerateTerrainVertices(BlockGeometryGenerator generator, TerrainGeometry geometry, int value, int x, int y, int z)
        {
            int   data       = Terrain.ExtractData(value);
            int   face       = BottomSuckerBlock.GetFace(data);
            int   subvariant = BottomSuckerBlock.GetSubvariant(data);
            Color color      = m_colors[subvariant];

            generator.GenerateMeshVertices(this, x, y, z, m_blockMeshes[4 * face + subvariant], color, null, geometry.SubsetOpaque);
            base.GenerateTerrainVertices(generator, geometry, value, x, y, z);
        }