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); }
public DoorTile(DoorInitializer initializer) : base(initializer) { }