Exemplo n.º 1
0
        internal static string[] GetComponentMemberSearch(string contextName, int totalNumberOfComponents)
        {
            if (!ContextToComponentMemberSearch.TryGetValue(contextName, out var componentMemberSearch))
            {
                componentMemberSearch = new string[totalNumberOfComponents];
                for (var i = 0; i < componentMemberSearch.Length; i++)
                {
                    componentMemberSearch[i] = string.Empty;
                }

                ContextToComponentMemberSearch.Add(contextName, componentMemberSearch);
            }

            return(componentMemberSearch);
        }
        private static string[] GetComponentMemberSearch(IEntity entity)
        {
            if (!ContextToComponentMemberSearch.TryGetValue(entity.ContextInfo.name, out var componentMemberSearch))
            {
                componentMemberSearch = new string[entity.TotalComponents];
                for (var i = 0; i < componentMemberSearch.Length; i++)
                {
                    componentMemberSearch[i] = string.Empty;
                }

                ContextToComponentMemberSearch.Add(entity.ContextInfo.name, componentMemberSearch);
            }

            return(componentMemberSearch);
        }