forked from HimbeerserverDE/mt
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathparticle.go
More file actions
61 lines (47 loc) · 1.21 KB
/
particle.go
File metadata and controls
61 lines (47 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
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
}
type ParticleParams struct {
Pos, Vel, Acc [3]float32
ExpirationTime float32 // in seconds.
Size float32
Collide bool
//mt:len32
TextureName Texture
Vertical bool
CollisionRm bool
AnimParams TileAnim
Glow uint8
AOCollision bool
NodeParam0 Content
NodeParam2 uint8
NodeTile uint8
Drag [3]float32
Jitter RangeV3F32
Bounce RangeF32
Texture ParticleTexture
}