Ejemplo n.º 1
0
        void Load(JObject jObject)
        {
            foreach (var child in jObject.Properties())
            {
                var element = LocalizedPhrase.Load(child);

                Dictionary.Add(child.Name, element);
            }
        }
Ejemplo n.º 2
0
        public virtual void Init()
        {
            Phrase = Localization.Phrases.Find(ID);

            if (Phrase == null)
            {
                Debug.LogWarning("No localization found for " + ID + ", please add");
            }
        }
Ejemplo n.º 3
0
        public static LocalizedPhrase Load(JProperty property)
        {
            var dictionary = new Dictionary <string, string>(StringComparer.OrdinalIgnoreCase);

            foreach (var child in property.Value.Children <JProperty>())
            {
                dictionary.Add(child.Name, child.Value.ToObject <string>());
            }

            var phrase = new LocalizedPhrase(dictionary);

            return(phrase);
        }
Ejemplo n.º 4
0
            protected override void Start()
            {
                Phrase = Localization.Phrases.Find(ID);

                base.Start();
            }