コード例 #1
0
    void CheckAuras(List <int> auraList)
    {
        List <int> indexToRemove = new List <int>();

        for (int i = 0; i < auraList.Count; i++)
        {
            if (!_auraDatabase.Contains(auraList[i]))
            {
                indexToRemove.Add(i);
            }
        }

        if (indexToRemove.Count == 0)
        {
            return;
        }

        for (int j = 0; j < indexToRemove.Count; j++)
        {
            auraList.RemoveAt(j);
            Debug.LogWarning("A perk was removed from this entry as it no longer exists in the perks database.");
        }
        EditorUtility.SetDirty(spellDatabase);
        AssetDatabase.SaveAssets();
    }
コード例 #2
0
    bool AuraRequirementsMet()
    {
        if (!_conditionDatabase.Contains(newAuraID))
        {
            Debug.LogError("Aura with ID " + newAuraID + " does not exist in the database.");
            return(false);
        }

        if (conditions.Contains(newAuraID))
        {
            Debug.LogError("This condition has already been added.");
            return(false);
        }

        return(true);
    }