Beispiel #1
0
 private void KillGoodie(GoodieWord word)
 {
     kills++;
     if (UnityEngine.Random.Range(streak, 100) > treasureChance)
     {
         AddTreasure(word.display.transform.position);
     }
 }
Beispiel #2
0
    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);
        }
    }