コード例 #1
0
 void Update()
 {
     if (roundStartedServer && CustomNetworkManager.Instance._isServer)
     {
         ElectricalSynchronisation.DoUpdate();
     }
 }
コード例 #2
0
    private void Update()
    {
        if (roundStartedServer && CustomNetworkManager.Instance._isServer && Mode == ElectricalMode.GameLoop && Running)
        {
            electricalSync.DoUpdate(false);
        }

        if (roundStartedServer && CustomNetworkManager.Instance._isServer && Running)
        {
            if (electricalSync.MainThreadProcess)
            {
                lock (ElectricalLock)
                {
                    electricalSync.PowerNetworkUpdate();
                    electricalSync.MainThreadProcess = false;
                    Monitor.Pulse(ElectricalLock);
                }
            }
        }
    }