示例#1
0
    private void RefreshStatus()
    {
        if (Time.time - _lastRefresh >= DelayRefreshStatus && RemoteUser != null && _remoteControl)
        {
            _socket.SendTo(RemoteUser, Message.CreatOldRefreshStatusMessage().ToJson());
        }

        if (Time.time - _lastRefresh >= 0.1f && RemoteUser != null && _remoteControl)
        {
            robotController.UpdatePos(robotController.ConvertRealPosToSimulationPos(_socket.GetLastPos()));
        }
    }