package components

import (
	"log"
)

type Transient struct {
	Activated bool
	Sprites   []string
	Current   int // sprite index
}

func (trans *Transient) GetNext() string {
	if len(trans.Sprites) > trans.Current {
		trans.Current++
		return trans.Sprites[trans.Current]
	}

	log.Fatalf("not enough sprites in transient tile, have %d sprites, index requested: %d",
		len(trans.Sprites), trans.Current+1,
	)

	return ""
}
