private void KillGoodie(GoodieWord word) { kills++; if (UnityEngine.Random.Range(streak, 100) > treasureChance) { AddTreasure(word.display.transform.position); } }
public void AddGoodie() { string theWord = GetRandomWord(cleans, true); if (theWord != null) { var rnd = new System.Random(); Word.CharacterClass characterClass = (Word.CharacterClass)rnd.Next(3); Word word = new GoodieWord(theWord, wordSpawner.SpawnGoodie(), characterClass); words.Add(word); } }