public void AddWord() { Word word = new Word(GetRandomWord(), wordSpawner.SpawnWord()); //Debug.Log(gameObject.name); words.Add(word); }
public void AddWord() { Word word = new Word(WordParser.GetRandomWord(), spawner.SpawnWord()); words.Add(word); Debug.Log("Random word was spawned succesfully : " + word.text); }
public void AddWord() { Word word = new Word(WordGenerator.GetRandomWord(), spawner.SpawnWord()); Debug.Log(word.word); words.Add(word); }
// Generates words and adds them to list public void AddWord(GameObject worldObject) { Word word = new Word(WordGenerator.GetRandomWord(words, startChars), wordSpawner.SpawnWord(worldObject), worldObject); startChars.Add(word.word[0]); words.Add(word); }
public void AddWord() { Word word = new Word(WordGenerator.GetRandomWord(), wordSpawner.SpawnWord()); Debug.Log("New letter is : " + word.word); words.Add(word); }
public void AddWord() { WordDisplay wordDisplay = wordSpawner.SpawnWord(); Word word = new Word(wordGenerator.GetRandomWord(), wordDisplay); words.Add(word); }
public Word GetRandomWord() { int index = Random.Range(0, stringList.Count); Word newWord; // Control color based on what index the word was chosen at // All words from lines 1-19 are green (powerup related awards) // Check if the Score has reached a certain threshold, then spawn a scary word if (GameController.level == (int)GameController.Level.story) { if (ScoreController.isHighScore()) { // Use only the final word ScoreController.UpdateHighScore(); newWord = new Word("Remember?", wordSpawner.SpawnWord()); newWord.display.IncreaseFontSize((int)(Random.Range(-0.2f, 1.0f) * 30)); newWord.display.isScary = true; newWord.display.transform.rotation = Quaternion.Euler(new Vector3(0f, 0f, Random.Range(-45f, 45f))); return(newWord); } else if (ScoreController.getScore() >= scaryWordScore) { newWord = new Word(stringList[scaryWordIndex++], wordSpawner.SpawnWord()); newWord.display.isScary = true; scaryWordScore += scaryWordScoreShift; return(newWord); } } newWord = new Word(stringList[index], wordSpawner.SpawnWord()); if (GameController.level == (int)GameController.Level.story) { if (index >= 20 && index < 28) { newWord.display.isScary = true; } newWord.lineNumFunction = index; } // Set the line number of the word within the dictionary file // for use in determining what words have powerups (to replace with function pointers) newWord.lineNumFunction = index; return(newWord); }
public void AddWord() { //WordDisplaye wordDisplay = wordSpawner.SpawnWord(); Word word = new Word(WordGenerator.GetRandomWord(), wordSpawner.SpawnWord()); Debug.Log(word.word); words.Add(word); }
public void AddWord() { Word word = new Word(WordGenerator.GetRandomWord(), wordSpawner.SpawnWord()); words.Add(word); //Debug.Log("MY DEBUG LINE 1: " + word.word); // The letters of the word that just spawned //Debug.Log("MY DEBUG LINE 2: " + word.damage); //The damage of the word that just spawned }
public void AddWord() { Word word = new Word(GetRandomWord(), wordSpawner.SpawnWord()); words.Add(word); Debug.Log(word.word); }
public void AddWord() // Method for pulling Random Word { Word word = new Word(WordGenerator.GetRandomWord(), wordSpawner.SpawnWord()); Debug.Log(word.word); words.Add(word); }
//Add word is used by the spawner class and simple pulls a random word from the word generator list public void AddWord() { Word word = new Word(wordGenerator.GetRandomWord(), wordSpawner.SpawnWord(space), this); space += Screen.width / 2; //That word object to also added to the word list. words.Add(word); }
public void AddWord() { Word word = new Word(WordGenerator.GetRandomWord(), wordSpawner.SpawnWord()); //print(word.word); words.Add(word); }
public void AddWord() { Word word = new Word(WordGenerator.ReadWords(), wordSpawner.SpawnWord()); Debug.Log(word.word); words.Add(word); }
public void AddWord() { palabras = WordGenerator.GetRandomWord().Split('.'); Word word = new Word(palabras[0], palabras[1], wordSpawner.SpawnWord()); words.Add(word); }
public void AddWord() { Word word = new Word(WordGenerator.GetWord(), wordSpawner.SpawnWord()); words.Add(word); Debug.Log(word.word); Counter++; }
public void AddWord() { Word word = new Word(WordGenerator.GetRandomWordFile(), wordSpawner.SpawnWord()); Debug.Log(word.word); WordCount++; NumWords.text = "Number Words Spawned: " + WordCount.ToString(); words.Add(word); }
public void AddWord() { while (removeCounter > 0) { Word word = new Word(WordGenerator.GetRandomWord(), wordSpawner.SpawnWord()); words.Add(word); removeCounter--; } }
public void SpawnColorWord() { WordDisplay wordDisplay = wordPrefab.GetComponent <WordDisplay>(); wordDisplay.SetWordColor(); color = wordDisplay.color; Word word = new Word(wordGenerator.GetRandomWord(), wordSpawner.SpawnWord()); Debug.Log(word.word); words.Add(word); }
public void AddWord() { Word word = new Word(WordGenerator.GetRandomWord(), wordSpawner.SpawnWord()); //Debug.Log(word.word); speed += 1 * Mathf.RoundToInt(GetComponent <WordTimer>().wordDelay); speedText.text = speed.ToString(); words.Add(word); }
// el codigo de caracter de backspace es \b public void AddWord(int num) { string cadena = "point" + num.ToString(); WordPosition = Interseccion.transform.Find(cadena).transform.position; Word word = new Word(WordGenerator.GetRandomWord(), wordSpawner.SpawnWord(Interseccion.transform.Find(cadena))); WordToMove = wordSpawner.wordObj; words.Add(word); wordOnScreen = true; }
public void AddWord() { //diffrent difficulty WordDisplay wordDisplay = wordSpawner.SpawnWord(); string wordText = getWordOnDiff(); Word word; preventRepeatedLetters(ref wordText); word = new Word(wordText, wordDisplay); //Debug.Log(word.text); words.Add(word); }
public override void OnInspectorGUI() { base.OnInspectorGUI(); //GUI.enabled = Application.isPlaying; WordSpawner wordSpawner = target as WordSpawner; if (GUILayout.Button("Spawn Word")) { wordSpawner.SpawnWord(); } }
// Update is called once per frame void Update() { if (numWordsPiled < numWordsToPile) { string word = getRandWord(); while (activeWords.ContainsKey(word)) { word = getRandWord(); } activeWords.Add(word, wordSpawner.SpawnWord(word)); numWordsPiled++; } else if (activeWords.Count < minWords) { numWordsPiled = 0; } }
void Update() { mTimer -= Time.deltaTime; if (mTimer <= 0.0f && !mHasActiveWord) //and does not already have an active word { //choose a word from mWords, then send it to wordspawner to spawn int randInd = UnityEngine.Random.Range(0, mWords.Count - 1); Word chosenWord = mWords[randInd]; mHasActiveWord = true; mActiveWord = chosenWord; //makes it easeir, removes from the master list words, don't have to deal with it again mWords.Remove(chosenWord); Debug.Log("Spawning the word: " + chosenWord.word + "!"); //set to new set of letterInstances each time a new word comes //letterIntances = mWordSpawner.SpawnWord(chosenWord.word); //spawn that chosen word mTimer = 5.0f; } //if after another 5 seconds haven't typed all words, by now they must've all gone past if (mTimer <= -5.0f) { //just quit that word, no more active word, reset timer mHasActiveWord = false; mActiveWord = null; //ignore that word now mTimer = 5.0f; } //loop letter index back to 0 here if needed if (letterIndex >= 5) { mHasActiveWord = false; mActiveWord = null; //ignore that word now letterIndex = 0; } }
// Use this for initialization when manager is enabled with "setActive" void OnEnable() { Debug.Log("OnEnabled BattleManager"); // Prevent to init on very first start of the game if (GameManager.instance != null && GameManager.instance.isBattle) { WordsRepository = XmlManager.Deserialize <WordsRepository>(); WordLevel wordLevel = EmotionMenager.GetInstance().WordLevelDifficulty(); ActiveWord = new WordToType(WordsRepository.GetRandomWord(wordLevel), WordSpawner.SpawnWord()); // get random enemy from prefabs Debug.Log("Init enemy:"); EnemyType enemyType = getEnemyType(); Debug.Log(enemyType); if (enemyType.Equals(EnemyType.Wolf)) { Debug.Log("Loading Wolf."); enemy = Instantiate(Resources.Load("Prefabs/WolfBattle", typeof(GameObject)), enemyPosition.position, Quaternion.identity) as GameObject; } else if (enemyType.Equals(EnemyType.Zombie)) { Debug.Log("Loading Zombie."); enemy = Instantiate(Resources.Load("Prefabs/Zombie1Battle", typeof(GameObject)), enemyPosition.position, Quaternion.identity) as GameObject; } Debug.Log(enemy); // enemy.transform.parent = enemyPosition; //set up player&enemy health text Debug.Log("Player health: "); Debug.Log(playerInBattle.GetComponent <PlayerInBattle>().health); Debug.Log("Enemy health: "); Debug.Log(enemy.GetComponent <EnemyInBattle>().health); maxEnemyHealth = enemy.GetComponent <EnemyInBattle>().health; playerHealth.text = playerInBattle.GetComponent <PlayerInBattle>().health + "/" + Player.maxHealth; enemyHealth.text = enemy.GetComponent <EnemyInBattle>().health + "/" + enemy.GetComponent <EnemyInBattle>().health; headline.text = "Fight!"; } }
public void AddWord(WordTypes wordType = WordTypes.NORMAL) { Word word = new Word(WordGenerator.GetRandomWord(), wordSpawner.SpawnWord(), wordFallSpeed, player.transform, wordType); words.Add(word); }
public void AddWord() { var word = new Word(WordGenerator.GetRadomWord(), wordSpawner.SpawnWord()); words.Add(word); }
public void AddWord() { Word word = new Word(WordGenerator.GetRandomWord(), wordSpawner.SpawnWord()); wordsList.Add(word); }
public void addWord() { Word word = new Word(WordGenerator.GetRandomWord(), wrodTxtSpawner.SpawnWord()); words.Add(word); }