Jump to content
  • Advertisement
Sign in to follow this  
menyo

Getting texture from deep complex List<>

This topic is 2702 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi,

I'm having a lot of difficulty to retrieve my data inside a list.

tilemap.basemaptiles is an array that contains my tile data in a list (currently just the ground data in it (count = 1) but want to expand this with lot more). The groundtile is derived from a basetile and with .elementAt i can get to those values but i can't seem to get to the child data (groundtile).

I'm not very familiar with using lists and was looking for some direction on how to get to my data. I have a picture of the data structure, don't know if it's enough though.

complex_list.png

I want to do something like this:
currentTexture = tileMap.MapTiles[count].ElementAt<GroundTile>(0).GroundTexture;

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!