mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-12 20:18:59 +01:00
examples/particles: Reduce emittion
This commit is contained in:
parent
0a35efbba9
commit
f7e7598567
@ -137,7 +137,7 @@ func newSprite(img *ebiten.Image) *sprite {
|
|||||||
var sprites = list.New()
|
var sprites = list.New()
|
||||||
|
|
||||||
func update(screen *ebiten.Image) error {
|
func update(screen *ebiten.Image) error {
|
||||||
if sprites.Len() < 500 {
|
if sprites.Len() < 500 && rand.Intn(4) < 3 {
|
||||||
// Emit
|
// Emit
|
||||||
sprites.PushBack(newSprite(smokeImage))
|
sprites.PushBack(newSprite(smokeImage))
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user