Example #1
0
 private void DisplayAITargeter(PlayerAbilityModifierData abilityData)
 {
     EditorGUI.indentLevel++;
     EditorGUILayout.LabelField("Target Picker");
     abilityData.targetPicker = EditorHelper.CreateAndDisplaySpecificScriptableObjectType(abilityData.targetPicker, abilityData, ref targetPickerEditor);
     EditorGUI.indentLevel--;
 }
Example #2
0
    private static void DisplayLabels(PlayerAbilityModifierData abilityData)
    {
        int newCount = EditorGUILayout.IntField("Num Labels", abilityData.labelRequirements.Count);

        EditorHelper.UpdateList(ref abilityData.labelRequirements, newCount, () => AbilityLabel.Attack, (a) => { });
        EditorGUI.indentLevel++;
        for (int i = 0; i < abilityData.labelRequirements.Count; i++)
        {
            abilityData.labelRequirements[i] = (AbilityLabel)EditorGUILayout.EnumPopup(abilityData.labelRequirements[i]);
        }
        EditorGUI.indentLevel--;
    }
Example #3
0
    private void DisplayCosts(PlayerAbilityModifierData abilityData)
    {
        int newCount = EditorGUILayout.IntField("Num Costs", abilityData.costs.Count);

        EditorHelper.UpdateList(ref abilityData.costs, newCount, () => null, (t) => GameObject.DestroyImmediate(t));
        EditorHelper.UpdateList(ref costsEditors, newCount, () => null, (t) => { });
        EditorGUI.indentLevel++;
        for (int i = 0; i < abilityData.costs.Count; i++)
        {
            var cost   = abilityData.costs[i];
            var editor = costsEditors[i];
            abilityData.costs[i] = EditorHelper.DisplayScriptableObjectWithEditor(abilityData, cost, ref editor, "");
        }
        EditorGUI.indentLevel--;
    }
Example #4
0
 public void RemoveCombatPlayerAbilityModifier(PlayerAbilityModifierData modifier)
 {
     combatPlayerAbilityModifiers.Remove(modifier);
     abilityModifiersChanged();
 }
Example #5
0
 public void AddCombatPlayerAbilityModifier(PlayerAbilityModifierData modifier)
 {
     combatPlayerAbilityModifiers.Add(modifier);
     abilityModifiersChanged();
 }