Animated Tiles
TpAnimatedTile
AnimatedTileTpAnimatedTile is a simple animated tile and if you want to learn about the code, it’s the simplest TPT Tile.
FlexAnimatedTilePublic fields:
Note that for TpAnimatedTile the static tile is the tile sprite. For TpFlexAnimatedTile the sprite specified by a clip’s DefaultTileIndex value is displayed. If that doesn’t work (it’s incorrect or the sprite is null) then the static tile is the tile sprite.
If painting this tile via script, see the FAQ entry “Animated tile not animating.”
TpFlexAnimatedTile
TpFlexAnimatedTile is an upgraded TpAnimatedTile that adds the ability to have multiple animation sequences contained in an asset file. Once placed, you can select on a per-tile basis which animation sequence is used initially, and several other settings, including whether to play automatically when the Scene is loaded, and which sequence is in use. When using many animated tiles, the use of an asset is more memory efficient than TpAnimatedTile.
The asset file for this tile is TpSpriteAnimationClipSet, and its fields are mostly the same as those for TpAnimatedTile. You can create it from the Assets/Create menu.
Public fields:
When inspecting one of these tiles using the Selection Inspector, you’ll see a dropdown Clip to use where you can select the animation sequence from the ClipSet to be used when your game starts. This can also be changed via code.
If painting this tile via script, see the FAQ entry “Animated tile not animating.”
TpSlideShow
TpSlideShow lets you display one Sprite at a time from a list of Sprites contained in an asset file. The initial Sprite to display can be changed, and you move from one Sprite to the next programmatically, with automatic wrapping or limiting, or set the displayed sprite directly.
Wrapping means that incrementing from the last slide returns to the first slide (or when decrementing, from the last slide to the first slide) and limiting means that incrementing from the last slide or decrementing from the first slide has no effect. This tile is used for the background in the BasicTiles demo.
The asset file for this tile is TpSlideShowSpriteSet, and its fields discussed in the Programmer’s Guide. You can create it from the Assets/Create menu.
Public fields:
The last three features listed above are discussed here.
When inspecting one of these tiles using the Selection Inspector, you’ll see a dropdown where you can select which slideshow set from the TpSlideShowSpriteSet to be used at start. This can also be changed via code.
Technically, the SlideShow tile uses the Tilemap's animation system but the animation is always on pause. Changing slides changes the animation parameters but only one sprite (slide) is shown at a time.
AnimatedSpawner