private void DisplayAITargeter(PlayerAbilityModifierData abilityData) { EditorGUI.indentLevel++; EditorGUILayout.LabelField("Target Picker"); abilityData.targetPicker = EditorHelper.CreateAndDisplaySpecificScriptableObjectType(abilityData.targetPicker, abilityData, ref targetPickerEditor); EditorGUI.indentLevel--; }
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--; }
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--; }
public void RemoveCombatPlayerAbilityModifier(PlayerAbilityModifierData modifier) { combatPlayerAbilityModifiers.Remove(modifier); abilityModifiersChanged(); }
public void AddCombatPlayerAbilityModifier(PlayerAbilityModifierData modifier) { combatPlayerAbilityModifiers.Add(modifier); abilityModifiersChanged(); }