Пример #1
0
        private void HandleTimeUpdate(NetworkMessage msg)
        {
            MsgTimeUpdate tu = msg as MsgTimeUpdate;

            TimeLeftInGame = tu.TimeLeft;

            if (!InTimedGame)
            {
                InTimedGame = true;
                if (TimedGameStarted != null)
                {
                    TimedGameStarted.Invoke(this, EventArgs.Empty);
                }
            }
            else
            {
                if (TimedGameTimeUpdated != null)
                {
                    TimedGameTimeUpdated.Invoke(this, EventArgs.Empty);
                }
            }
        }
Пример #2
0
        private static void HandleTimeUpdate(NetworkMessage msg)
        {
            MsgTimeUpdate tu = msg as MsgTimeUpdate;

            WriteLine("MsgTimeUpdate Time Left" + tu.TimeLeft.ToString());
        }