Пример #1
0
        protected override void OnCreate()
        {
            base.OnCreate();

            factoryGroup = GetEntityQuery(
                ComponentType.ReadWrite <UnitFactory.Component>(),
                ComponentType.ReadOnly <UnitFactory.HasAuthority>(),
                ComponentType.ReadWrite <ResourceComponent.Component>(),
                ComponentType.ReadOnly <ResourceComponent.HasAuthority>(),
                ComponentType.ReadOnly <BaseUnitStatus.Component>(),
                ComponentType.ReadOnly <Position.Component>(),
                ComponentType.ReadOnly <StrongholdSight.Component>(),
                ComponentType.ReadOnly <SpatialEntityId>()
                );

            factoryInter  = IntervalCheckerInitializer.InitializedChecker(1.0f);
            factoryAction = FactoryQuery;

            checkerGroup = GetEntityQuery(
                ComponentType.ReadWrite <UnitFactory.Component>(),
                ComponentType.ReadOnly <UnitFactory.HasAuthority>(),
                ComponentType.ReadOnly <BaseUnitStatus.Component>()
                );

            checkerInter = IntervalCheckerInitializer.InitializedChecker(1.5f);
            checkAction  = CheckQuery;
        }
Пример #2
0
        protected override void OnCreate()
        {
            base.OnCreate();

            advancedOtherGroup = GetEntityQuery(
                ComponentType.ReadOnly <BaseUnitStatus.Component>(),
                ComponentType.ReadOnly <AdvancedUnitController.Component>(),
                ComponentType.Exclude <LocalController>()
                );

            action = Query;
        }