Ejemplo n.º 1
0
            public void OnSetup(ComponentSystemBase system)
            {
                visualFromEntity     = system.GetComponentDataFromEntity <EntityVisual>(true);
                ownerFromEntity      = system.GetComponentDataFromEntity <Owner>(true);
                predictionFromEntity = system.GetComponentDataFromEntity <ShooterProjectileVisualTarget>(true);

                definitionMap = (system as EntityVisualPoolingSystem).definitionHashMap;
                definitionMap.Clear();
            }
 public void BeginSerialize(ComponentSystemBase system)
 {
     componentTypeHealth             = ComponentType.ReadWrite <Health>();
     componentTypePlayerUnit         = ComponentType.ReadWrite <PlayerUnit>();
     componentTypeUnitSelectionState = ComponentType.ReadWrite <UnitSelectionState>();
     componentTypePhysicsCollider    = ComponentType.ReadWrite <PhysicsCollider>();
     componentTypeCompositeScale     = ComponentType.ReadWrite <CompositeScale>();
     componentTypeLocalToWorld       = ComponentType.ReadWrite <LocalToWorld>();
     componentTypeRotation           = ComponentType.ReadWrite <Rotation>();
     componentTypeTranslation        = ComponentType.ReadWrite <Translation>();
     componentTypeLinkedEntityGroup  = ComponentType.ReadWrite <LinkedEntityGroup>();
     ghostHealthType             = system.GetArchetypeChunkComponentType <Health>(true);
     ghostPlayerUnitType         = system.GetArchetypeChunkComponentType <PlayerUnit>(true);
     ghostUnitSelectionStateType = system.GetArchetypeChunkComponentType <UnitSelectionState>(true);
     ghostRotationType           = system.GetArchetypeChunkComponentType <Rotation>(true);
     ghostTranslationType        = system.GetArchetypeChunkComponentType <Translation>(true);
     ghostLinkedEntityGroupType  = system.GetArchetypeChunkBufferType <LinkedEntityGroup>(true);
     ghostChild0RotationType     = system.GetComponentDataFromEntity <Rotation>(true);
     ghostChild0TranslationType  = system.GetComponentDataFromEntity <Translation>(true);
     ghostChild1RotationType     = system.GetComponentDataFromEntity <Rotation>(true);
     ghostChild1TranslationType  = system.GetComponentDataFromEntity <Translation>(true);
     ghostChild2RotationType     = system.GetComponentDataFromEntity <Rotation>(true);
     ghostChild2TranslationType  = system.GetComponentDataFromEntity <Translation>(true);
     ghostChild3RotationType     = system.GetComponentDataFromEntity <Rotation>(true);
     ghostChild3TranslationType  = system.GetComponentDataFromEntity <Translation>(true);
 }
 public void BeginSerialize(ComponentSystemBase system)
 {
     componentTypeMovableCubeComponent = ComponentType.ReadWrite <MovableCubeComponent>();
     componentTypePhysicsCollider      = ComponentType.ReadWrite <PhysicsCollider>();
     componentTypeLocalToWorld         = ComponentType.ReadWrite <LocalToWorld>();
     componentTypeRotation             = ComponentType.ReadWrite <Rotation>();
     componentTypeTranslation          = ComponentType.ReadWrite <Translation>();
     componentTypeLinkedEntityGroup    = ComponentType.ReadWrite <LinkedEntityGroup>();
     ghostMovableCubeComponentType     = system.GetArchetypeChunkComponentType <MovableCubeComponent>(true);
     ghostRotationType          = system.GetArchetypeChunkComponentType <Rotation>(true);
     ghostTranslationType       = system.GetArchetypeChunkComponentType <Translation>(true);
     ghostLinkedEntityGroupType = system.GetArchetypeChunkBufferType <LinkedEntityGroup>(true);
     ghostChild0RotationType    = system.GetComponentDataFromEntity <Rotation>(true);
     ghostChild0TranslationType = system.GetComponentDataFromEntity <Translation>(true);
 }
 public void BeginSerialize(ComponentSystemBase system)
 {
     componentTypeTeleporterClientDataClass  = ComponentType.ReadWrite <TeleporterClientDataClass>();
     componentTypeTeleporterPresentationData = ComponentType.ReadWrite <TeleporterPresentationData>();
     componentTypeTeleporterServer           = ComponentType.ReadWrite <TeleporterServer>();
     componentTypeLocalToWorld           = ComponentType.ReadWrite <LocalToWorld>();
     componentTypeRotation               = ComponentType.ReadWrite <Rotation>();
     componentTypeTranslation            = ComponentType.ReadWrite <Translation>();
     componentTypeLinkedEntityGroup      = ComponentType.ReadWrite <LinkedEntityGroup>();
     ghostTeleporterPresentationDataType = system.GetArchetypeChunkComponentType <TeleporterPresentationData>(true);
     ghostTranslationType       = system.GetArchetypeChunkComponentType <Translation>(true);
     ghostLinkedEntityGroupType = system.GetArchetypeChunkBufferType <LinkedEntityGroup>(true);
     ghostChild0TranslationType = system.GetComponentDataFromEntity <Translation>(true);
     ghostChild1TranslationType = system.GetComponentDataFromEntity <Translation>(true);
 }
Ejemplo n.º 5
0
 public void BeginSerialize(ComponentSystemBase system)
 {
     componentTypeAbilityCollectionAbilityEntry = ComponentType.ReadWrite <AbilityCollection.AbilityEntry>();
     componentTypeAbilityCollectionState        = ComponentType.ReadWrite <AbilityCollection.State>();
     componentTypeAbilityOwnerOwnedAbility      = ComponentType.ReadWrite <AbilityOwner.OwnedAbility>();
     componentTypeAbilityOwnerOwnedCollection   = ComponentType.ReadWrite <AbilityOwner.OwnedCollection>();
     componentTypeAbilityOwnerState             = ComponentType.ReadWrite <AbilityOwner.State>();
     componentTypeAimDataData = ComponentType.ReadWrite <AimData.Data>();
     componentTypeAnimSourceControllerRigData           = ComponentType.ReadWrite <AnimSourceController.RigData>();
     componentTypeAnimSourceControllerSettings          = ComponentType.ReadWrite <AnimSourceController.Settings>();
     componentTypeCharacterInterpolatedData             = ComponentType.ReadWrite <Character.InterpolatedData>();
     componentTypeCharacterPredictedData                = ComponentType.ReadWrite <Character.PredictedData>();
     componentTypeCharacterReplicatedData               = ComponentType.ReadWrite <Character.ReplicatedData>();
     componentTypeCharacterSettings                     = ComponentType.ReadWrite <Character.Settings>();
     componentTypeCharacterControllerComponentData      = ComponentType.ReadWrite <CharacterControllerComponentData>();
     componentTypeCharacterControllerGroundSupportData  = ComponentType.ReadWrite <CharacterControllerGroundSupportData>();
     componentTypeCharacterControllerInitializationData = ComponentType.ReadWrite <CharacterControllerInitializationData>();
     componentTypeCharacterControllerMoveQuery          = ComponentType.ReadWrite <CharacterControllerMoveQuery>();
     componentTypeCharacterControllerMoveResult         = ComponentType.ReadWrite <CharacterControllerMoveResult>();
     componentTypeCharacterControllerVelocity           = ComponentType.ReadWrite <CharacterControllerVelocity>();
     componentTypeDamageEvent            = ComponentType.ReadWrite <DamageEvent>();
     componentTypeDamageHistoryData      = ComponentType.ReadWrite <DamageHistoryData>();
     componentTypeHealthStateData        = ComponentType.ReadWrite <HealthStateData>();
     componentTypeInventoryInternalState = ComponentType.ReadWrite <Inventory.InternalState>();
     componentTypeInventoryItemEntry     = ComponentType.ReadWrite <Inventory.ItemEntry>();
     componentTypeInventoryState         = ComponentType.ReadWrite <Inventory.State>();
     componentTypePartOwnerInputState    = ComponentType.ReadWrite <PartOwner.InputState>();
     componentTypePartOwnerRegistryAsset = ComponentType.ReadWrite <PartOwner.RegistryAsset>();
     componentTypePlayerOwnerPlayerId    = ComponentType.ReadWrite <Player.OwnerPlayerId>();
     componentTypePlayerControlledState  = ComponentType.ReadWrite <PlayerControlled.State>();
     componentTypeSkeletonRenderer       = ComponentType.ReadWrite <SkeletonRenderer>();
     componentTypeLocalToWorld           = ComponentType.ReadWrite <LocalToWorld>();
     componentTypeRotation                           = ComponentType.ReadWrite <Rotation>();
     componentTypeTranslation                        = ComponentType.ReadWrite <Translation>();
     componentTypeLinkedEntityGroup                  = ComponentType.ReadWrite <LinkedEntityGroup>();
     ghostCharacterInterpolatedDataType              = system.GetArchetypeChunkComponentType <Character.InterpolatedData>(true);
     ghostCharacterPredictedDataType                 = system.GetArchetypeChunkComponentType <Character.PredictedData>(true);
     ghostCharacterReplicatedDataType                = system.GetArchetypeChunkComponentType <Character.ReplicatedData>(true);
     ghostCharacterControllerGroundSupportDataType   = system.GetArchetypeChunkComponentType <CharacterControllerGroundSupportData>(true);
     ghostCharacterControllerMoveResultType          = system.GetArchetypeChunkComponentType <CharacterControllerMoveResult>(true);
     ghostCharacterControllerVelocityType            = system.GetArchetypeChunkComponentType <CharacterControllerVelocity>(true);
     ghostHealthStateDataType                        = system.GetArchetypeChunkComponentType <HealthStateData>(true);
     ghostInventoryStateType                         = system.GetArchetypeChunkComponentType <Inventory.State>(true);
     ghostPlayerOwnerPlayerIdType                    = system.GetArchetypeChunkComponentType <Player.OwnerPlayerId>(true);
     ghostPlayerControlledStateType                  = system.GetArchetypeChunkComponentType <PlayerControlled.State>(true);
     ghostLinkedEntityGroupType                      = system.GetArchetypeChunkBufferType <LinkedEntityGroup>(true);
     ghostChild0AbilityAbilityControlType            = system.GetComponentDataFromEntity <Ability.AbilityControl>(true);
     ghostChild0AbilityMovementInterpolatedStateType = system.GetComponentDataFromEntity <AbilityMovement.InterpolatedState>(true);
     ghostChild0AbilityMovementPredictedStateType    = system.GetComponentDataFromEntity <AbilityMovement.PredictedState>(true);
     ghostChild1AbilityAbilityControlType            = system.GetComponentDataFromEntity <Ability.AbilityControl>(true);
     ghostChild2AbilityAbilityControlType            = system.GetComponentDataFromEntity <Ability.AbilityControl>(true);
     ghostChild2AbilityDashPredictedStateType        = system.GetComponentDataFromEntity <AbilityDash.PredictedState>(true);
     ghostChild3AbilityAbilityControlType            = system.GetComponentDataFromEntity <Ability.AbilityControl>(true);
     ghostChild3AbilityClimbPredictedStateType       = system.GetComponentDataFromEntity <AbilityClimb.PredictedState>(true);
 }
Ejemplo n.º 6
0
        public void OnSetup(ComponentSystemBase system)
        {
            LocalInstigatorId = -1;
            if (system.HasSingleton <LocalInstigatorId>())
            {
                LocalInstigatorId = system.GetSingleton <LocalInstigatorId>().Value;
            }

            snapshotEntityFromEntity = system.GetComponentDataFromEntity <SnapshotEntity>();
        }
Ejemplo n.º 7
0
 public void BeginSerialize(ComponentSystemBase system)
 {
     componentTypeAbilityCollectionAbilityEntry = ComponentType.ReadWrite <AbilityCollection.AbilityEntry>();
     componentTypeAbilityCollectionState        = ComponentType.ReadWrite <AbilityCollection.State>();
     componentTypeItemInputState         = ComponentType.ReadWrite <Item.InputState>();
     componentTypePartOwnerInputState    = ComponentType.ReadWrite <PartOwner.InputState>();
     componentTypePartOwnerRegistryAsset = ComponentType.ReadWrite <PartOwner.RegistryAsset>();
     componentTypeRigAttacherAttachBone  = ComponentType.ReadWrite <RigAttacher.AttachBone>();
     componentTypeRigAttacherState       = ComponentType.ReadWrite <RigAttacher.State>();
     componentTypeLocalToWorld           = ComponentType.ReadWrite <LocalToWorld>();
     componentTypeRotation                            = ComponentType.ReadWrite <Rotation>();
     componentTypeTranslation                         = ComponentType.ReadWrite <Translation>();
     componentTypeLinkedEntityGroup                   = ComponentType.ReadWrite <LinkedEntityGroup>();
     ghostItemInputStateType                          = system.GetArchetypeChunkComponentType <Item.InputState>(true);
     ghostLinkedEntityGroupType                       = system.GetArchetypeChunkBufferType <LinkedEntityGroup>(true);
     ghostChild0AbilityAbilityActionType              = system.GetComponentDataFromEntity <Ability.AbilityAction>(true);
     ghostChild0AbilityAbilityControlType             = system.GetComponentDataFromEntity <Ability.AbilityControl>(true);
     ghostChild0AbilityAutoRifleInterpolatedStateType = system.GetComponentDataFromEntity <AbilityAutoRifle.InterpolatedState>(true);
     ghostChild0AbilityAutoRiflePredictedStateType    = system.GetComponentDataFromEntity <AbilityAutoRifle.PredictedState>(true);
 }
 public void BeginSerialize(ComponentSystemBase system)
 {
     componentTypeLocalToWorld      = ComponentType.ReadWrite <LocalToWorld>();
     componentTypeNonUniformScale   = ComponentType.ReadWrite <NonUniformScale>();
     componentTypeRotation          = ComponentType.ReadWrite <Rotation>();
     componentTypeTranslation       = ComponentType.ReadWrite <Translation>();
     componentTypeLinkedEntityGroup = ComponentType.ReadWrite <LinkedEntityGroup>();
     ghostRotationType          = system.GetArchetypeChunkComponentType <Rotation>(true);
     ghostTranslationType       = system.GetArchetypeChunkComponentType <Translation>(true);
     ghostLinkedEntityGroupType = system.GetArchetypeChunkBufferType <LinkedEntityGroup>(true);
     ghostChild0RotationType    = system.GetComponentDataFromEntity <Rotation>(true);
     ghostChild0TranslationType = system.GetComponentDataFromEntity <Translation>(true);
     ghostChild1RotationType    = system.GetComponentDataFromEntity <Rotation>(true);
     ghostChild1TranslationType = system.GetComponentDataFromEntity <Translation>(true);
     ghostChild2RotationType    = system.GetComponentDataFromEntity <Rotation>(true);
     ghostChild2TranslationType = system.GetComponentDataFromEntity <Translation>(true);
     ghostChild3RotationType    = system.GetComponentDataFromEntity <Rotation>(true);
     ghostChild3TranslationType = system.GetComponentDataFromEntity <Translation>(true);
     ghostChild4RotationType    = system.GetComponentDataFromEntity <Rotation>(true);
     ghostChild4TranslationType = system.GetComponentDataFromEntity <Translation>(true);
 }
Ejemplo n.º 9
0
 public void BeginSerialize(ComponentSystemBase system)
 {
     #region __GHOST_ASSIGN_COMPONENT_TYPE__
     componentType__GHOST_COMPONENT_TYPE_NAME__ = ComponentType.ReadWrite <__GHOST_COMPONENT_TYPE__>();
     #endregion
     #region __GHOST_ASSIGN_COMPONENT_TYPE_DATA__
     ghost__GHOST_COMPONENT_TYPE_NAME__Type = system.GetArchetypeChunkComponentType <__GHOST_COMPONENT_TYPE__>(true);
     #endregion
     #region __GHOST_ASSIGN_BUFFER_COMPONENT_TYPE_DATA__
     ghost__GHOST_COMPONENT_TYPE_NAME__Type = system.GetArchetypeChunkBufferType <__GHOST_COMPONENT_TYPE__>(true);
     #endregion
     #region __GHOST_ASSIGN_COMPONENT_TYPE_CHILD_DATA__
     ghost__GHOST_COMPONENT_TYPE_NAME__Type = system.GetComponentDataFromEntity <__GHOST_COMPONENT_TYPE__>(true);
     #endregion
 }
Ejemplo n.º 10
0
        public static JobHandle GetChangedTransformFromEntity(
            this EntityQuery query,
            ComponentSystemBase system,
            ref NativeHashMap <Entity, LocalToWorld> resultHashMap,
            JobHandle inputDeps)
        {
            inputDeps = resultHashMap.Clear(inputDeps, query.CalculateEntityCount());
            var entities = query.ToEntityArrayAsync(Allocator.TempJob, out var toEntityHandle);

            inputDeps = JobHandle.CombineDependencies(inputDeps, toEntityHandle);
            inputDeps = new ChangedTransformsToEntity {
                Entities = entities,
                LocalToWorldFromEntity = system.GetComponentDataFromEntity <LocalToWorld>(true),
                ChangedComponents      = resultHashMap.AsParallelWriter()
            }.Schedule(query.GetTransformAccessArray(), inputDeps);
            return(inputDeps);
        }
Ejemplo n.º 11
0
 public void BeginSerialize(ComponentSystemBase system)
 {
     componentTypePlayerCommandData    = ComponentType.ReadWrite <PlayerCommandData>();
     componentTypePhysicsCollider      = ComponentType.ReadWrite <PhysicsCollider>();
     componentTypePhysicsGravityFactor = ComponentType.ReadWrite <PhysicsGravityFactor>();
     componentTypePhysicsMass          = ComponentType.ReadWrite <PhysicsMass>();
     componentTypePhysicsVelocity      = ComponentType.ReadWrite <PhysicsVelocity>();
     componentTypeLocalToWorld         = ComponentType.ReadWrite <LocalToWorld>();
     componentTypeRotation             = ComponentType.ReadWrite <Rotation>();
     componentTypeTranslation          = ComponentType.ReadWrite <Translation>();
     componentTypeLinkedEntityGroup    = ComponentType.ReadWrite <LinkedEntityGroup>();
     ghostPlayerCommandDataType        = system.GetArchetypeChunkComponentType <PlayerCommandData>(true);
     ghostRotationType          = system.GetArchetypeChunkComponentType <Rotation>(true);
     ghostTranslationType       = system.GetArchetypeChunkComponentType <Translation>(true);
     ghostLinkedEntityGroupType = system.GetArchetypeChunkBufferType <LinkedEntityGroup>(true);
     ghostChild0RotationType    = system.GetComponentDataFromEntity <Rotation>(true);
     ghostChild0TranslationType = system.GetComponentDataFromEntity <Translation>(true);
     ghostChild1RotationType    = system.GetComponentDataFromEntity <Rotation>(true);
     ghostChild1TranslationType = system.GetComponentDataFromEntity <Translation>(true);
     ghostChild2RotationType    = system.GetComponentDataFromEntity <Rotation>(true);
     ghostChild2TranslationType = system.GetComponentDataFromEntity <Translation>(true);
     ghostChild3RotationType    = system.GetComponentDataFromEntity <Rotation>(true);
     ghostChild3TranslationType = system.GetComponentDataFromEntity <Translation>(true);
     ghostChild4RotationType    = system.GetComponentDataFromEntity <Rotation>(true);
     ghostChild4TranslationType = system.GetComponentDataFromEntity <Translation>(true);
     ghostChild5RotationType    = system.GetComponentDataFromEntity <Rotation>(true);
     ghostChild5TranslationType = system.GetComponentDataFromEntity <Translation>(true);
     ghostChild6RotationType    = system.GetComponentDataFromEntity <Rotation>(true);
     ghostChild6TranslationType = system.GetComponentDataFromEntity <Translation>(true);
     ghostChild7RotationType    = system.GetComponentDataFromEntity <Rotation>(true);
     ghostChild7TranslationType = system.GetComponentDataFromEntity <Translation>(true);
     ghostChild8RotationType    = system.GetComponentDataFromEntity <Rotation>(true);
     ghostChild8TranslationType = system.GetComponentDataFromEntity <Translation>(true);
 }
 public void OnSetup(ComponentSystemBase system)
 {
     DisabledFromEntity = system.GetComponentDataFromEntity <Disabled>(true);
     PopupFromEntity    = system.GetComponentDataFromEntity <Relative <PopupDescription> >(true);
 }