]> git.lizzy.rs Git - mt.git/blob - tileanim.go
Add WaitGroup to SerializePkt
[mt.git] / tileanim.go
1 package mt
2
3 type AnimType uint8
4
5 const (
6         NoAnim            AnimType = iota // none
7         VerticalFrameAnim                 // vertical frame
8         SpriteSheetAnim                   // sprite sheet
9         maxAnim
10 )
11
12 //go:generate stringer -linecomment -type AnimType
13
14 type TileAnim struct {
15         Type AnimType
16         //mt:assert %s.Type < maxAnim
17
18         //mt:if %s.Type == SpriteSheetAnim
19         AspectRatio [2]uint8
20         //mt:end
21
22         //mt:if %s.Type == VerticalFrameAnim
23         NFrames [2]uint16
24         //mt:end
25
26         //mt:if %s.Type != NoAnim
27         Duration float32 // in seconds
28         //mt:end
29 }