예제 #1
0
        public IEnumerator RequestHeartbeat(float time)
        {
            yield return new WaitForSeconds(time);

            ConnectionManager cManager = gameObject.GetComponent<ConnectionManager>();

            if (cManager) {
                RequestHeartbeat request = new RequestHeartbeat();
                request.Send();

                cManager.Send(request);
            }

            //originially 1f changed to .1f
            StartCoroutine(RequestHeartbeat(1f));
        }
예제 #2
0
        public IEnumerator RequestHeartbeat(float time)
        {
            yield return(new WaitForSeconds(time));

            ConnectionManager cManager = gameObject.GetComponent <ConnectionManager>();

            if (cManager)
            {
                RequestHeartbeat request = new RequestHeartbeat();
                request.Send();

                cManager.Send(request);
            }

            //originially 1f changed to .1f
            StartCoroutine(RequestHeartbeat(1f));
        }