Ejemplo n.º 1
0
        public static void Init()
        {
            ActionScripts.actionScriptLookup.Clear();
            List <Type> list = new List <Type>(Actions.List);

            MonoScript[] array  = (MonoScript[])Resources.FindObjectsOfTypeAll(typeof(MonoScript));
            MonoScript[] array2 = array;
            for (int i = 0; i < array2.Length; i++)
            {
                MonoScript monoScript = array2[i];
                string     text       = Labels.NicifyVariableName(monoScript.get_name());
                Type       type       = null;
                using (List <Type> .Enumerator enumerator = list.GetEnumerator())
                {
                    while (enumerator.MoveNext())
                    {
                        Type current = enumerator.get_Current();
                        if (text == Labels.GetActionLabel(current))
                        {
                            if (!ActionScripts.actionScriptLookup.ContainsKey(current))
                            {
                                ActionScripts.actionScriptLookup.Add(current, monoScript);
                            }
                            type = current;
                        }
                    }
                }
                if (type != null)
                {
                    list.Remove(type);
                    if (list.get_Count() == 0)
                    {
                        return;
                    }
                }
            }
        }