rename<U> method

SpriteEntry<U> rename<U>(
  1. int index,
  2. U key
)

The same entry, sitting at index and answering to key instead.

For the layers that renumber or name what they hold.

Implementation

SpriteEntry<U> rename<U>(int index, U key) {
  return SpriteEntry<U>(
    index: index,
    key: key,
    image: image,
    size: size,
    loops: loops,
    rects: _rects,
    durations: _durations,
  );
}