AddOnChoiceListUI.LoadChoices
Declaration#
public void LoadChoices(AddOnPlugin plugin, BasicInfo info, PlayerCharacterStats source, Action<List<ISelectableOption>> resultsCallback)Parameters#
| Name | Description |
|---|---|
| plugin | Plug-in providing list |
| info | Information about the plugin |
| source | Object providing stats |
| resultsCallback | Callback 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#
| Name | Description |
|---|---|
| choices | List of Plug-ins to choose from |
| info | Information about the plugin |
| source | Object providing stats |
| callback | Callback 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); } }
}
}