particle_request.go
1 package components 2 3 import "image/color" 4 5 // ParticleEffectRequest asks ParticleSystem to spawn an effect 6 type ParticleEffectRequest struct { 7 X, Y float64 8 Color color.RGBA 9 Kind string // "packet" or "powerup" 10 } 11 12 func NewParticleEffectRequest(x, y float64, col color.RGBA, kind string) *ParticleEffectRequest { 13 return &ParticleEffectRequest{X: x, Y: y, Color: col, Kind: kind} 14 } 15 16 func (r *ParticleEffectRequest) GetType() string { return "ParticleEffectRequest" }