예제 #1
0
    public void setFloorType(int newType)
    {
        if (newType == this.m_floorType)
        {
            return;
        }
        SimWorld simWorld = AppEngine.getCanvas().getSimWorld();

        GeomStrip.remapTexCoords(this.m_compositeMesh, simWorld.getFloorTexCoords(this.m_floorType), simWorld.getFloorTexCoords(newType), 24);
        this.m_floorType = newType;
    }
예제 #2
0
    public void setWallType(int newType)
    {
        if (newType == this.m_wallType)
        {
            return;
        }
        SimWorld simWorld = AppEngine.getCanvas().getSimWorld();

        int[] wallTexCoords1 = simWorld.getWallTexCoords(this.m_wallType);
        int[] wallTexCoords2 = simWorld.getWallTexCoords(newType);
        for (int index = 0; index < 4; ++index)
        {
            int submeshIndex = index * 6;
            GeomStrip.remapTexCoords(this.m_compositeMesh, wallTexCoords1, wallTexCoords2, submeshIndex);
            GeomStrip.remapTexCoords(this.m_compositeMesh, wallTexCoords1, wallTexCoords2, submeshIndex + 2);
        }
        this.m_wallType = newType;
    }