示例#1
0
        private void Awake()
        {
            AfterAwake();
            _rootCanvasGroup                = GetComponent <CanvasGroup>();
            _rootCanvasGroup.alpha          = 0;
            _rootCanvasGroup.interactable   = false;
            _rootCanvasGroup.blocksRaycasts = false;
            _visibleStream = UniRxUtils.ObserveInputKeyDown(KeyCode.F1, () =>
            {
                if (_isShowed)
                {
                    Hide();
                }
                else
                {
                    Show();
                }
            }, gameObject);

            if (_isDefaultShow)
            {
                Show();
            }
            else
            {
                Hide();
            }
        }
示例#2
0
 protected void Connect()
 {
     _connectStream = UniRxUtils.StartCoroutine(ConnectEnumerator, () =>
     {
         Debug.Log($"Success tcp connect : IpAddress = {_host} Port = {_port}");
         _connectStream = null;
     });
 }
示例#3
0
 protected void StartServer()
 {
     _startServerStream = UniRxUtils.StartCoroutine(StartServerEnumerator, () =>
     {
         Debug.Log($"Success start tcp server : IpAddress = {_host} Port = {_port}");
         _startServerStream        = null;
         _updateListenPacketStream = Observable.EveryUpdate().Subscribe(_ => UpdateListenPacket());
     });
 }