Ejemplo n.º 1
0
 public DrawableTile(DrawableTile TilePreset)
     : this()
 {
     this.Origin       = TilePreset.Origin;
     this.TilesetIndex = TilePreset.TilesetIndex;
     if (TilePreset.Terrain3DInfo != null)
     {
         this.Terrain3DInfo = new Terrain3D(TilePreset.Terrain3DInfo);
     }
 }
Ejemplo n.º 2
0
        public DrawableTile(BinaryReader BR, int TileWidth, int TileHeight)
        {
            TilesetIndex = BR.ReadInt32();
            Origin       = new Rectangle(BR.ReadInt32(), BR.ReadInt32(), TileWidth, TileHeight);
            bool HasTerrain3DInfo = BR.ReadBoolean();

            Terrain3DInfo = null;
            if (HasTerrain3DInfo)
            {
                Terrain3DInfo = new Terrain3D(BR, TileWidth, TileHeight);
            }
        }
Ejemplo n.º 3
0
        public Terrain3D(Terrain3D Other)
        {
            TerrainStyle = Other.TerrainStyle;
            Transparancy = Other.Transparancy;

            switch (TerrainStyle)
            {
            case TerrainStyles.Flat:
                break;

            default:
                FrontFace = new DrawableTile(Other.FrontFace);
                BackFace  = new DrawableTile(Other.BackFace);
                LeftFace  = new DrawableTile(Other.LeftFace);
                RightFace = new DrawableTile(Other.RightFace);
                break;
            }
        }
Ejemplo n.º 4
0
 public DrawableTile(Rectangle Origin, int Tileset)
 {
     this.Origin       = Origin;
     this.TilesetIndex = Tileset;
     Terrain3DInfo     = new Terrain3D();
 }