예제 #1
0
 private static int GetWordIndex(Glossary.Language language, Enemy.Type enemyType, string name)
 {
     foreach (Vocabulary vocab in vocabularies)
     {
         if (vocab.type.Equals(enemyType))
         {
             if (language.Equals(Glossary.Language.FR))
             {
                 foreach (Word word in vocab.frWords)
                 {
                     if (word.name.Equals(name))
                     {
                         return(vocab.frWords.IndexOf(word));
                     }
                 }
             }
             else if (language.Equals(Glossary.Language.EN))
             {
                 foreach (Word word in vocab.enWords)
                 {
                     if (word.name.Equals(name))
                     {
                         return(vocab.enWords.IndexOf(word));
                     }
                 }
             }
         }
     }
     return(-1);
 }
예제 #2
0
 public static List <Word> GetVocabulary(Enemy.Type enemyType, Glossary.Language language)
 {
     foreach (Vocabulary vocabulary in vocabularies)
     {
         if (vocabulary.type.Equals(enemyType))
         {
             if (language.Equals(Glossary.Language.FR))
             {
                 return(vocabulary.frWords);
             }
             else if (language.Equals(Glossary.Language.EN))
             {
                 return(vocabulary.enWords);
             }
         }
     }
     return(null);
 }