void Start() { winText = GameObject.FindGameObjectWithTag("WinText").GetComponent <Text>(); words = WordsContainer.GetAllPairsForShootingGame(); DrawRandomCategory(); text.text = drawText; }
private KeyValuePair <string, string> wordGenarate() { List <KeyValuePair <string, string> > words = WordsContainer.GetAllWordsWithTranslation(); System.Random random = new System.Random(); int index = random.Next(words.Count); return(words[index]); }
public static WordsContainer Load(string path) { TextAsset _xml = Resources.Load <TextAsset>(path); XmlSerializer serializer = new XmlSerializer(typeof(WordsContainer)); StringReader reader = new StringReader(_xml.text); WordsContainer words = serializer.Deserialize(reader) as WordsContainer; reader.Close(); words.Words = words.Words.FindAll(w => w.difficulty.Equals(PlayerPrefs.GetString("Difficulty"))); return(words); }
void Start() { Cursor.visible = false; screenCenter = Camera.main.ScreenToWorldPoint(new Vector3(Screen.width / 2, Screen.height / 2, 0)); words = WordsContainer.GetAllPairsForShootingGame(); currentCategory = DrawTaskCategory.GetCurrentCategory(); word.text = SetCurrentWord(); SetWordRotation(); movementVector = (screenCenter - transform.position).normalized * speed; movementVector.z = 0; currentLifeTime = lifeTime; timer = waitTime; }
public void CategoriesFromXMLNoDuplicates() { Assert.AreEqual(2, WordsContainer.GetAllCategories()); }
public void CategoriesFromXMLContains() { Assert.Contains("animal", WordsContainer.GetAllCategories()); }
public WordOperator(WordsContainer wordsContainer, IWriter writer) { this.writer = writer; this.wordsContainer = wordsContainer; }
public RankListPoint(IWriter writer, WordsContainer wordsContainer) { this.writer = writer; this.wordsContainer = wordsContainer; }
public Player(IReader reader, IWriter writer, WordsContainer wordsContainer) { this.reader = reader; this.writer = writer; this.wordsContainer = wordsContainer; }
public TrieFactory(IUnityContainer unityContainer, WordsContainer wordsContainer) { this.wordsContainer = wordsContainer; this.unityContainer = unityContainer; }