Advertisement
rooster5105

fill dict

Jul 10th, 2014
221
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.93 KB | None | 0 0
  1. Ini ini = new Ini("../config/TileTypes.ini");
  2.             foreach (string section in ini.GetSections()){
  3.                foreach(string key in ini.GetKeys(section)){
  4.                    ini.GetValue(key);
  5.                    TileType type = new TileType()
  6.                }
  7.                    
  8.             Dictionary<string, TileType> detailedInfo = new Dictionary<string, TileType>();
  9.             type = new TileType();
  10.             detailedInfo.Add(key, type);
  11.             }
  12.  
  13.  
  14. /*Ini File Follows*/
  15. ;I really didn't want to do it this way, but here we go.  New Types of Tiles are here!
  16. ;Syntax Is:
  17. ;[TILETYPE] <-ALL CAPS
  18. ;name=tilename
  19. ;tileChar='ch' <-single char to use for printing to console: debug only, really.
  20. ;passable=true/false
  21. ;speedMod=.05 <- floating point from 0.0 to 1.0
  22. ;image=imagename.png <-do not path this, we handle that in the engine
  23.  
  24. [WATER]
  25. name="water"
  26. tilechar=~
  27. passable=false
  28. speedmod=0
  29. image=water.png
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement