Esempio n. 1
0
 protected override void OnCreate()
 {
     m_beginBarrier = World.GetOrCreateSystem <BeginSimulationEntityCommandBufferSystem>();
     m_NetworkReceiveSystemGroup = World.GetOrCreateSystem <NetworkReceiveSystemGroup>();
     m_NetworkTimeSystem         = World.GetOrCreateSystem <NetworkTimeSystem>();
     m_fixedUpdateMarker         = new ProfilerMarker("ClientFixedUpdate");
 }
        protected override void OnCreate()
        {
            m_StatIndex = -1;

            m_ServerSimulationSystemGroup = World.GetExistingSystem <ServerSimulationSystemGroup>();
            m_ClientSimulationSystemGroup = World.GetExistingSystem <ClientSimulationSystemGroup>();
            if (m_ClientSimulationSystemGroup != null)
            {
                m_NetworkTimeSystem = World.GetOrCreateSystem <NetworkTimeSystem>();
            }
            m_SnapshotStats = new NativeArray <uint>(0, Allocator.Persistent);
            m_SnapshotTicks = new NativeList <uint>(16, Allocator.Persistent);
            m_TimeSamples   = new NativeList <TimeSample>(16, Allocator.Persistent);
            m_CommandTicks  = new NativeList <uint>(16, Allocator.Persistent);

            m_PacketQueue = new List <Packet>();
            m_PacketPool  = new List <byte[]>();
        }
 protected override void OnCreate()
 {
     base.OnCreate();
     m_NetworkTimeSystem = World.GetOrCreateSystem <NetworkTimeSystem>();
 }
Esempio n. 4
0
 protected override void OnCreate()
 {
     base.OnCreate();
     m_NetworkTimeSystem = World.GetOrCreateSystem <NetworkTimeSystem>();
     m_currentTime       = Time.ElapsedTime;
 }