Esempio n. 1
0
        public Tile GetTile(DoorTileData t)
        {
            if (t.Door == null)
            {
                throw new ArgumentNullException("Invalid map format. Door item should be at door tile.");
            }

            SetMinimapTile(Color.Purple);

            var initializer = new DoorInitializer {
                Door = CreateDoor(t)
            };

            initializer.HasButton = t.Door.HasButton;


            initializer.Direction = t.Orientation == Orientation.NorthSouth ? MapDirection.North : MapDirection.East;

            var res = new DoorTile(initializer);

            sidesCreator.SetupSidesAsync(initializer, currentGridPosition, res);
            res.Renderer     = builder.Factories.RenderersSource.GetDoorTileRenderer(res, builder.WallTexture, builder.DoorButtonTexture);
            this.initializer = initializer;
            return(res);
        }
Esempio n. 2
0
 public DoorTile(DoorInitializer initializer) : base(initializer)
 {
 }