/// <summary>
        /// 填充需要关联的组件
        /// </summary>
        public void FillRelateComponents(IShipDockComponentContext manager)
        {
            int name;
            IShipDockComponent item;
            int max = RelateComponents != default ? RelateComponents.Length : 0;

            for (int i = 0; i < max; i++)
            {
                name = RelateComponents[i];
                if (!mRelatedComponents.ContainsKey(name))
                {
                    item = manager.RefComponentByName(name);
                    if (item != default)
                    {
                        mRelatedComponents[name] = item;
                    }
                }
            }
            bool needCheckReFill = (max > 0) && (mRelatedComponents.Size != max);

            if (needCheckReFill)
            {
                manager.RelateComponentsReFiller += ReFillRelateComponents;
            }
        }
        public override void Init(IShipDockComponentContext context)
        {
            base.Init(context);

            mWorldEventNotices = new Queue <INotice>();
            mEventItems        = new Queue <WorldInteracter>();

            mWorldItemMapper = new KeyValueList <int, WorldInteracter>();
            mGroupsMapper    = new KeyValueList <int, ClusteringData>();
            mAroundMapper    = new KeyValueList <int, WorldMovement>();

            WorldComp        = GetRelatedComponent <WorldComponent>(WorldComponentName);
            BehaviourIDsComp = context.RefComponentByName(WorldComp.BehaviaourIDsComponentName) as BehaviourIDsComponent;
            ClusteringComp   = context.RefComponentByName(WorldComp.WorldGroupComponentName) as ClusteringComponent;

            ShouldWorldGroupable = ClusteringComp != default;
        }
        public DataComponentGroup(IShipDockComponentContext context, ref K[] keys, ref int[] componentNames)
        {
            int max = componentNames.Length;

            Group = new KeyValueList <K, C>(max);

            C groupItem;

            for (int i = 0; i < max; i++)
            {
                groupItem = (C)context.RefComponentByName(componentNames[i]);
                Group.Put(keys[i], groupItem);
            }
        }