Calling textures dynamically
<p>I am iterating through a list that contains ints and I need them to link up with Textures that I have. </p>

<p>An example is </p>

<pre><code>          for (int i = 0; i&lt;spellsRectangles.size(); i++){
              if(selectedSpells.contains(i){
                  drawSpellFromRect(Asset."spell"+i+"Light",i);
              }else{
                  drawSpellFromRect(Asset."spell"+i+"Dark",i);
              }
          }

          drawSpellFromRect(TextureRegion tr, int i){
              spriteBatcher.draw(tr,spellsRectangles.get(i).x,spellsRectangles.get(i).y,spellsRectangles.get(i).height,spellsRectangles.get(i).width)
          }
</code></pre>

<p>spellRectangles is an arraylist of rectangles</p>

<p>The textures are all already made and I just need to access them. Is there a way to use and iterator to call the textures. Instead of going to texture1, texture2, texture3, ect.</p>

<p>I have looked and realize I cannot create variables dynamically but can I call them?</p>
