Beispiel #1
0
    void Update()
    {
        ServerJobHandle.Complete();
        var connectionJob = new ServerUpdateConnectionsJob {
            driver      = m_Driver,
            connections = m_Connections
        };

        var serverUpdateJob = new ServerUpdateJob {
            driver      = m_Driver.ToConcurrent(),
            connections = m_Connections.AsDeferredJobArray()
        };

        ServerJobHandle = m_Driver.ScheduleUpdate();
        ServerJobHandle = connectionJob.Schedule(ServerJobHandle);
        ServerJobHandle = serverUpdateJob.Schedule(m_Connections, 1, ServerJobHandle);
    }
Beispiel #2
0
    // Update is called once per frame
    void Update()
    {
        ServerJobHandle.Complete();

        var connectionJob = new ServerUpdateConnectionsJob
        {
            driver      = m_Driver,
            connections = m_Connections
        };

        var serverUpdateJob = new ServerUpdateJob
        {
            driver        = m_Driver.ToConcurrent(),
            connections   = m_Connections.AsDeferredJobArray(),
            commandBuffer = ecbSystem.CreateCommandBuffer().ToConcurrent()
        };

        ServerJobHandle = m_Driver.ScheduleUpdate();
        ServerJobHandle = connectionJob.Schedule(ServerJobHandle);
        ServerJobHandle = serverUpdateJob.Schedule(m_Connections, 1, ServerJobHandle);
        ecbSystem.AddJobHandleForProducer(ServerJobHandle);
    }
    void Update()
    {
        serverJobHandle.Complete();

        ServerUpdateConnectionsJob connectionJob = new ServerUpdateConnectionsJob
        {
            driver      = m_Driver,
            connections = m_Connections,
        };

        ServerUpdateJob serverUpdateJob = new ServerUpdateJob
        {
            driver      = m_Driver.ToConcurrent(),
            connections = m_Connections.AsDeferredJobArray(),
            pipeline    = m_Reliable_Pipeline
        };

        serverJobHandle = m_Driver.ScheduleUpdate();
        serverJobHandle = connectionJob.Schedule(serverJobHandle);
        serverJobHandle.Complete();
        //Debug.Log(m_Connections.Length);
        serverJobHandle = serverUpdateJob.Schedule(m_Connections.Length, 1, serverJobHandle);
    }
    // Update is called once per frame
    void Update()
    {
        ServerJobHandle.Complete();

        updatePlayers();

        ServerUpdateConnectionsJob connectionJob = new ServerUpdateConnectionsJob
        {
            driver      = Driver,
            connections = Connections,
            players     = Players
        };

        ServerUpdateJob serverUpdateJob = new ServerUpdateJob
        {
            driver      = Driver.ToConcurrent(),
            connections = Connections.AsDeferredJobArray(),
            players     = Players
        };

        ServerJobHandle = Driver.ScheduleUpdate();
        ServerJobHandle = connectionJob.Schedule(ServerJobHandle);
        ServerJobHandle = serverUpdateJob.Schedule(Connections, 1, ServerJobHandle);
    }