Exemplo n.º 1
0
        protected override void OnCreate()
        {
            m_GhostPredictionSystemGroup   = World.GetExistingSystem <GhostPredictionSystemGroup>();
            m_GhostPredictionHistorySystem = World.GetExistingSystem <GhostPredictionHistorySystem>();
            m_GhostCollectionSystem        = World.GetExistingSystem <GhostCollectionSystem>();

            m_PredictionQuery   = GetEntityQuery(ComponentType.ReadOnly <PredictedGhostComponent>(), ComponentType.ReadOnly <GhostComponent>());
            m_ChildEntityLookup = new NativeHashMap <Entity, EntityChunkLookup>(1024, Allocator.Persistent);
            m_ChildEntityQuery  = GetEntityQuery(ComponentType.ReadOnly <GhostChildEntityComponent>());
        }
Exemplo n.º 2
0
        protected override void OnCreate()
        {
            m_GhostPredictionSystemGroup   = World.GetExistingSystem <GhostPredictionSystemGroup>();
            m_GhostPredictionHistorySystem = World.GetExistingSystem <GhostPredictionHistorySystem>();

            m_PredictionQuery   = GetEntityQuery(ComponentType.ReadOnly <PredictedGhostComponent>(), ComponentType.ReadOnly <GhostComponent>());
            m_ChildEntityLookup = new NativeHashMap <Entity, EntityChunkLookup>(1024, Allocator.Persistent);
            m_ChildEntityQuery  = GetEntityQuery(ComponentType.ReadOnly <GhostChildEntityComponent>());

            m_UserSpecifiedComponentData = new NativeList <ComponentType>(8, Allocator.Persistent);
            m_SmoothingActions           = new NativeHashMap <ComponentType, SmoothingActionState>(32, Allocator.Persistent);

            RequireSingletonForUpdate <GhostCollection>();
            RequireSingletonForUpdate <SmoothingAction>();
        }