Skip to main content

AddOnChoiceListUI.LoadChoices

Declaration#

public void LoadChoices(AddOnPlugin plugin, BasicInfo info, PlayerCharacterStats source, Action<List<ISelectableOption>> resultsCallback)

Parameters#

NameDescription
pluginPlug-in providing list
infoInformation about the plugin
sourceObject providing stats
resultsCallbackCallback to invoke when choice is made

Description#

Load a list of choices

Usage#

Example
using NullSave.GDTK;using NullSave.GDTK.Stats;using System.Collections.Generic;using UnityEngine;
public class Example : MonoBehaviour{
    public void ExampleMethod(AddOnChoiceListUI target, GDTKTrait other, PlayerCharacterStats source)    {        void callback(List<ISelectableOption> l)        {            Debug.Log("Load complete");        }
        foreach (UniversalPluginWrapper<AddOnPlugin> wrapper in other.addOnPlugins)        {            if(wrapper.plugin.needsUI)            {                target.LoadChoices(wrapper.plugin, other.info, source, callback);            }        }
    }
}

Declaration#

public void LoadChoices(List<AddOnPluginChoice> choices, BasicInfo info, PlayerCharacterStats source, Action<AddOnPluginChoice> callback)

Parameters#

NameDescription
choicesList of Plug-ins to choose from
infoInformation about the plugin
sourceObject providing stats
callbackCallback to invoke when choice is made

Description#

Load a list of choices

Usage#

Example
using NullSave.GDTK;using NullSave.GDTK.Stats;using UnityEngine;
public class Example : MonoBehaviour{
    public void ExampleMethod(AddOnChoiceListUI target, GDTKTrait other, PlayerCharacterStats source)    {        foreach (UniversalPluginWrapper<AddOnPlugin> wrapper in other.addOnPlugins)        {            if(wrapper.plugin.needsUI)            {                target.LoadChoices(wrapper.plugin, other.info, source);            }        }
    }
}