Example #1
0
        protected static bool ST_GetCurrentIndex(KAU.PlayerSystem.IDataIndexed findForMe,
                                                 KAU.PlayerSystem.IData LookingIn,
                                                 System.Reflection.FieldInfo[] allprops,
                                                 string[] list, int depth, int _usedIndex)
        {
            if (list.Length <= depth)
            {
                return(true);
            }
            // Find in current
            bool isFound = false;

            if (_usedIndex >= 0)
            {
                isFound     = true;
                list[depth] = _usedIndex.ToString();
            }
            else
            {
                var fromEnumatarot = ST_GetEnumaretor(LookingIn, allprops);
                int index          = -1;
                if (fromEnumatarot != null)
                {
                    for (int i = 0; i < fromEnumatarot.Count && !isFound; i++)
                    {
                        index = 0;
                        if (fromEnumatarot[i] != null)
                        {
                            foreach (var innerItem in fromEnumatarot[i])
                            {
                                if (innerItem != null && innerItem == findForMe)
                                {
                                    isFound     = true;
                                    list[depth] = index.ToString();
                                    break;
                                }
                                index++;
                            }
                        }
                    }
                }
            }

            return(isFound);
        }
Example #2
0
 public abstract void getIndex(KAU.PlayerSystem.IDataIndexed forMe, string[] list, int depth);