How to change Sprite texture to Animation
I have a Sprite that spawns every second, what I wan't to do is change the sprite texture to animation, and the when it's touched it will be back to a normal texture. public void draw(SpriteBatch batch){ enemyIterator=enemies.iterator(); //arraylist iterator boolean touched=Gdx.input.justTouched(); float touchX=Gdx.input.getX(); //rendering and making the current sprite move while(enemyIterator.hasNext()){ Sprite sprite=enemyIterator.next(); sprite.draw(batch); sprite.translateY(deltaTime*movement); //detecting if the screen is touched and if the inputX is inside of the sprite. if(touched=