private void DisplayCosts(MapAbilityData 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--;
    }
Beispiel #2
0
 get => new MapObjectData(MapUnitData, MapItemData, MapDestructableData, MapDoodadData, MapAbilityData, MapBuffData, MapUpgradeData);