Exemplo n.º 1
0
 public static void ReadKeyData(ContentManager Content)
 {
     string[] filenames = Directory.GetFiles(@"Content\Game\Keys", "*.xnb");
     foreach (string name in filenames)
     {
         string  filename = @"Game\Keys\" + Path.GetFileNameWithoutExtension(name);
         KeyData data     = Content.Load <KeyData>(filename);
         KeyData.Add(data.Name, data);
     }
 }