Esempio n. 1
0
        public override void OnFrame(int tick, float timePass)
        {
            if (chessMoveAnim.Update())
            {
                refreshAll.Fire();
            }

            effectRun.Update(doubleBuffedPanel1);

            textFlow.Update(doubleBuffedPanel1);

            refreshAll.Update();

            timerManager.DoTimer();

            if (!isPlayerRound)
            {
                aiRobot.OnTick();
            }
        }
Esempio n. 2
0
        public static void Oneloop()
        {
            timerManager.DoTimer();

            if (hasConnect && client != null)
            {
                if (client.State == SocketState.Closed || client.State == SocketState.Closing)
                {
                    MainForm.Instance.ShowDisconnectSafe("已经与服务器断开连接");
                    client = null;
                    return;
                }

                try
                {
                    client.Oneloop();
                    CheckHeartbeat();
                }
                catch (Exception e)
                {
                    NLog.Debug(e);
                }
            }
        }