diff options
Diffstat (limited to 'particle.go')
-rw-r--r-- | particle.go | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/particle.go b/particle.go new file mode 100644 index 0000000..4f6bce5 --- /dev/null +++ b/particle.go @@ -0,0 +1,38 @@ +package mt + +type AttractionKind uint8 + +const ( + NoAttraction AttractionKind = iota // None + PointAttraction // Point + LineAttraction // Line + PlaneAttraction // Plane +) + +//go:generate stringer -linecomment -type AttractionKind + +type ParticleSpawnerFlags uint8 + +const ( + AttractorKill ParticleSpawnerFlags = 1 << iota // Particle dies on contact +) + +//go:generate stringer -linecomment -type ParticleSpawnerFlags + +type ParticleTextureFlags uint8 + +const ( + Animated ParticleTextureFlags = 1 << iota // Animated +) + +//go:generate stringer -linecomment -type ParticleTextureFlags + +type ParticleTexture struct { + Flags ParticleTextureFlags + Alpha TweenF32 + Scale TweenV2F32 + + //mt:if %s.Flags & Animated == Animated + Animation TileAnim + //mt:end +} |