Skip to content

Instantly share code, notes, and snippets.

@nanodeath
Created June 7, 2011 03:25
Show Gist options
  • Save nanodeath/1011627 to your computer and use it in GitHub Desktop.
Save nanodeath/1011627 to your computer and use it in GitHub Desktop.
class Tileset
{
private Dictionary<String, Texture2D> tiles;
public Texture2D this[string key]
{
get
{
return tiles[key];
}
}
// close enough...
public class Tileset {
private Map<String, Image> _tiles = new HashMap<String, Image>();
public Map<String, Image> tiles = Collections.unmodifiableMap(_tiles);
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment