summaryrefslogtreecommitdiff
path: root/particle.go
diff options
context:
space:
mode:
authorHimbeerserverDE <himbeerserverde@gmail.com>2023-06-08 18:03:05 +0200
committerHimbeerserverDE <himbeerserverde@gmail.com>2023-06-08 18:03:05 +0200
commit9b71132b974c8f320ce2ee78514ead7d3b366278 (patch)
tree6178321c33adccdd5ca361a7af2e889b7ae87332 /particle.go
parent6ba80361f9f462870438ecd22f59f8333c8929a7 (diff)
add support for new particle spawner packet formats
Diffstat (limited to 'particle.go')
-rw-r--r--particle.go38
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
+}