示例#1
0
        /// <summary>
        /// Marks a debris item to be swept if it matches the filters.
        /// </summary>
        /// <param name="content">The item to sweep.</param>
        /// <param name="priority">The priority to set the sweep errand.</param>
        private void MarkForClear(GameObject content, PrioritySetting priority)
        {
            var cc = content.GetComponent <Clearable>();

            if (cc != null && cc.isClearable && cachedTypes.Contains(content.PrefabID()))
            {
                // Parameter is whether to force, not remove sweep errand!
                cc.MarkForClear(false);
                var pr = content.GetComponent <Prioritizable>();
                if (pr != null)
                {
                    pr.SetMasterPriority(priority);
                }
            }
        }
示例#2
0
        /// <summary>
        /// Marks a debris item to be swept if it matches the filters.
        /// </summary>
        /// <param name="content">The item to sweep.</param>
        /// <param name="priority">The priority to set the sweep errand.</param>
        private void MarkForClear(GameObject content, PrioritySetting priority)
        {
            var cc = content.GetComponent <Clearable>();

            if (cc != null && cc.isClearable && (cachedAll || cachedTypes.Contains(content.
                                                                                   PrefabID())))
            {
                // In beta branch a new optional parameter was added
                cc.MarkForClear(false);
                var pr = content.GetComponent <Prioritizable>();
                if (pr != null)
                {
                    pr.SetMasterPriority(priority);
                }
            }
        }