Строка 318: |
Строка 318: |
| : Смотри [http://doc.mapeditor.org документацию по Tiled]. | | : Смотри [http://doc.mapeditor.org документацию по Tiled]. |
| | | |
− | ===Tile animation=== | + | ===Тайлы анимации=== |
| [[File:Modding - creating an XNB mod - example animation.gif|right]] | | [[File:Modding - creating an XNB mod - example animation.gif|right]] |
− | You can animate tiles to create effects like Gil in his rocking chair (see example at right).
| + | Вы можете анимировать плитки для создания эффектов, таких как Гил в кресле-качалке (смотри пример справа). |
| | | |
− | If you're using SMAPI:
| + | Если вы используете SMAPI: |
| :<syntaxhighlight lang="c#"> | | :<syntaxhighlight lang="c#"> |
| public override void Entry(IModHelper helper) | | public override void Entry(IModHelper helper) |
Строка 333: |
Строка 333: |
| GameLocation location = Game1.currentLocation; | | GameLocation location = Game1.currentLocation; |
| | | |
− | // add animated tile | + | // добавить анимированный тайл |
| Layer layer = location.map.GetLayer("Buildings"); | | Layer layer = location.map.GetLayer("Buildings"); |
| TileSheet tilesheet = location.map.GetTilesheet("tilesheet name"); | | TileSheet tilesheet = location.map.GetTilesheet("tilesheet name"); |
Строка 349: |
Строка 349: |
| </syntaxhighlight> | | </syntaxhighlight> |
| | | |
− | If you're using Tiled:
| + | Если вы используете Tiled: |
− | :# Click the edit button (wrench icon) for the tilesheet in the ''Tilesets'' pane. | + | :# Нажмите кнопку изменить (значок гаечного ключа) для таблицы листов на панели ''Tilesets''. |
− | :# Select the tile you want to animate in the new view. | + | :# Выберите тайл, который вы хотите анимировать в новом представлении. |
− | :# Click ''Tileset > Tile Animation Editor'' in the toolbar to show that window. | + | :# Нажмите ''Tileset > Tile Animation Editor'' на панели инструментов, чтобы отобразить это окно. |
− | :# In the new window, drag tiles from the tilesheet into the box on the left to create a ''frame'' (one image in the sequence). If you need to delete frames, select the frame(s) and press Backspace/Delete(Windows) or fn + Backspace(Apple) | + | :# В новом окне, перетащите плитки из таблицы в поле слева, чтобы создать ''кадр'' (одно изображение в последовательности).Если вам нужно удалить кадры, выберете их и нажмите Backspace/Delete(для Windows) или fn + Backspace(для Apple) |
− | :# Double-click the numbers to change how long each frame stays on the screen before the next one (in milliseconds). '''Make sure every frame has the same time; the game can't handle variable frame times.''' For example, here's the animation editor showing one of the tiles of Gil rocking:<br />[[File:Modding - creating an XNB mod - Tiled example animation pane.gif]] | + | :# Дважды щелкните, чтобы изменить продолжительность пребывания каждого кадра на экране (в миллисекундах). '''Убедитесь, что каждый кадр имеет одинаковое время; игра не может обрабатывать разное время кадров.''' Например, вот редактор анимации, показывающий одну из плиток раскачивания Гила:<br />[[File:Modding - creating an XNB mod - Tiled example animation pane.gif]] |
− | :# When you're done, close the pane. | + | :# Когда вы закончите, закройте панель. |
− | :# The animated tiles in the ''Tilesets'' pane will now have a little symbol in the bottom-right corner:<br />[[File:Modding - creating an XNB mod - Tiled example animation tileset.png]]<br />The animation is now part of that tile. Every instance of that tile on the map will now have the same animation. | + | :# Анимированные тайлы на панели ''Tilesets'' теперь буут иметь символ в правом нижнем углу:<br />[[File:Modding - creating an XNB mod - Tiled example animation tileset.png]]<br />Анимация теперь является частью этого тайла. Каждый экземпляр этого тайла на карте теперь будет иметь одну и ту же анимацию. |
| | | |
| ===Tile flip/rotation=== | | ===Tile flip/rotation=== |