StatFunctions.SubKnowsLanguage
Declaration#
public static void SubKnowsLanguage(Dictionary<string, StatSource> sources, string request, SimpleEvent requester, List<SimpleEvent> subscriptionList)Parameters#
| Name | Description |
|---|---|
| sources | Dictionary of available Stat Sources |
| request | Request to subscribe to |
| requester | Callback to call on subscription udates |
| subscriptionList | List of subscriptions |
Description#
Subscribe to knows langauge
Usage#
Example
using NullSave.GDTK;using NullSave.GDTK.Stats;using System.Collections.Generic;using UnityEngine;
public class Example : MonoBehaviour{ public void ExampleMethod(StatSource source) { Dictionary<string, StatSource> sources = new Dictionary<string, StatSource> { { string.Empty, source }, { "global:", ToolRegistry.GetComponent<GlobalStats>().source } };
List<SimpleEvent> events = new List<SimpleEvent>(); StatFunctions.SubKnowsLanguage(sources, "common", ValueChanged, events); }
private void ValueChanged() { Debug.Log("Request value has changed"); }
}