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;
        }
Exemple #2
0
        protected override void OnCreate()
        {
            base.OnCreate();

            querySet = new EntityQuerySet(GetEntityQuery(
                                              ComponentType.ReadOnly <UnitActionData>(),
                                              ComponentType.ReadWrite <GunComponent.Component>(),
                                              ComponentType.ReadOnly <GunComponent.HasAuthority>(),
                                              ComponentType.ReadWrite <PostureAnimation.Component>(),
                                              ComponentType.ReadOnly <PostureAnimation.HasAuthority>(),
                                              ComponentType.ReadOnly <BaseUnitTarget.Component>(),
                                              ComponentType.ReadOnly <BaseUnitStatus.Component>(),
                                              ComponentType.ReadOnly <PostureBoneContainer>(),
                                              ComponentType.ReadOnly <SpatialEntityId>()), frequency);

            action = Query;
        }