package ui

import (
	"github.com/hajimehoshi/ebiten"
)

var (
	SpeedDivisor = 2
)

type animation []*ebiten.Image

func (a animation) image(tick int) *ebiten.Image {
	if len(a) == 0 {
		return nil
	}

	return a[(tick/SpeedDivisor)%len(a)]
}
