protected override void OnCreateManager()
    {
        m_NewGhosts          = new NativeList <T>(16, Allocator.Persistent);
        m_NewGhostIds        = new NativeList <int>(16, Allocator.Persistent);
        m_Archetype          = GetGhostArchetype();
        m_PredictedArchetype = GetPredictedGhostArchetype();
        m_InitialArchetype   = EntityManager.CreateArchetype(ComponentType.ReadWrite <T>(), ComponentType.ReadWrite <ReplicatedEntityComponent>());

        m_GhostMap           = World.GetOrCreateSystem <GhostReceiveSystemGroup>().GhostEntityMap;
        m_ConcurrentGhostMap = m_GhostMap.ToConcurrent();
        m_DestroyGroup       = GetEntityQuery(ComponentType.ReadOnly <T>(),
                                              ComponentType.Exclude <ReplicatedEntityComponent>(), ComponentType.Exclude <PredictedSpawnRequestComponent>(),
                                              ComponentType.Exclude <GhostClientPrefabComponent>());
        m_SpawnRequestGroup = GetEntityQuery(ComponentType.ReadOnly <T>(),
                                             ComponentType.ReadOnly <PredictedSpawnRequestComponent>());
        m_PrefabGroup = GetEntityQuery(ComponentType.ReadOnly <T>(),
                                       ComponentType.ReadOnly <GhostClientPrefabComponent>());

        m_InvalidGhosts                 = new NativeList <Entity>(1024, Allocator.Persistent);
        m_DelayedSpawnQueue             = new NativeQueue <DelayedSpawnGhost>(Allocator.Persistent);
        m_CurrentDelayedSpawnList       = new NativeList <DelayedSpawnGhost>(1024, Allocator.Persistent);
        m_ConcurrentDelayedSpawnQueue   = m_DelayedSpawnQueue.ToConcurrent();
        m_PredictedSpawnQueue           = new NativeQueue <DelayedSpawnGhost>(Allocator.Persistent);
        m_CurrentPredictedSpawnList     = new NativeList <DelayedSpawnGhost>(1024, Allocator.Persistent);
        m_ConcurrentPredictedSpawnQueue = m_PredictedSpawnQueue.ToConcurrent();
        m_Barrier = World.GetOrCreateSystem <EndSimulationEntityCommandBufferSystem>();

        m_PredictSpawnGhosts        = new NativeList <PredictSpawnGhost>(16, Allocator.Persistent);
        m_PredictionSpawnCleanupMap = new NativeHashMap <int, int>(16, Allocator.Persistent);

        m_TimeSystem = World.GetOrCreateSystem <NetworkTimeSystem>();
    }
示例#2
0
        protected override void OnCreate()
        {
            RequireSingletonForUpdate <EnableNetFPS>();

            m_GhostUpdateSystemGroup = World.GetOrCreateSystem <GhostUpdateSystemGroup>();
            m_NetworkTime            = World.GetOrCreateSystem <NetworkTimeSystem>();
            m_Queue = new NativeQueue <FireRpc>(Allocator.Persistent);
        }
示例#3
0
    protected override void OnCreate()
    {
        cmdTargetGroup = GetEntityQuery(
            ComponentType.ReadWrite <CommandTargetComponent>(),
            ComponentType.Exclude <NetworkStreamDisconnected>());

        m_TimeSystem = World.GetOrCreateSystem <NetworkTimeSystem>();
    }
示例#4
0
 protected override void OnCreateManager()
 {
     barrier = World.GetOrCreateSystem <BeginSimulationEntityCommandBufferSystem>();
     bulletSpawnArchetype = EntityManager.CreateArchetype(
         ComponentType.ReadWrite <PredictedSpawnRequestComponent>(),
         ComponentType.ReadWrite <BulletSnapshotData>());
     lastPredictedSpawn  = new NativeArray <uint>(1, Allocator.Persistent);
     m_NetworkTimeSystem = World.GetOrCreateSystem <NetworkTimeSystem>();
     RequireSingletonForUpdate <ClientSettings>();
 }
 protected override void OnCreateManager()
 {
     m_NetworkTimeSystem = World.GetOrCreateSystem <NetworkTimeSystem>();
 }
示例#6
0
 protected override void OnCreateManager()
 {
     m_RpcQueue          = World.GetOrCreateSystem <MultiplayerSampleRpcSystem>().GetRpcQueue <RpcSpawn>();
     m_NetworkTimeSystem = World.GetOrCreateSystem <NetworkTimeSystem>();
 }
示例#7
0
 protected override void OnCreateManager()
 {
     m_ReceiveSystem = World.GetOrCreateSystem <NetworkStreamReceiveSystem>();
     m_TimeSystem    = World.GetOrCreateSystem <NetworkTimeSystem>();
 }