コード例 #1
0
ファイル: WordManager.cs プロジェクト: bsarsgard/curse-swords
    public void AddTreasure(Vector3 position)
    {
        string theWord = GetRandomWord(cleans, true);

        if (theWord != null)
        {
            int swordChance = 0;
            if (!activeSpell.IsActive())
            {
                swordChance = (streak + wave) * 5;
            }
            TreasureWord word = new TreasureWord(theWord, wordSpawner.SpawnTreasure(position), swordChance);

            if (word.characterClass == Word.CharacterClass.TreasureSword && !showedSwordTip)
            {
                showedSwordTip = true;
                AddTip("Collect Swords to unlock words in Curse Sword phrases", new Vector3(0, 0, 0));
            }
            words.Add(word);
        }
    }