public void InitEnemyManager() { if (!enemyManager.Initialized) { var enemyDir = fileResolver.ResolveDir("enemies"); if (!string.IsNullOrEmpty(enemyDir)) { var fileList = fileResolver.GetFiles(enemyDir); List <string> shortNames = new List <string>(); foreach (string s in fileList) { shortNames.Add(s.Substring(s.IndexOf("enemies"))); } shortNames.Sort(); AddEnemyTemplates(shortNames); TransferEnemyTemplates(); } } }