示例#1
0
        public void End(BaseRound newRound = null)
        {
            EndTime = 0f;

            OnEnd();

            if (Host.IsClient && EndMessage.Length > 0)
            {
                ChatBox.AddInformation(EndMessage);
            }

            (Game.Current as Game).SetRound(newRound ?? GetNextRound());
        }
示例#2
0
        public virtual void SetRound(BaseRound newRound = null)
        {
            // Prioritize the round specified by the OLD round.
            var roundToUse = newRound;

            if (roundToUse == null)
            {
                return;
            }

            // Assign new one and start it.
            Round = newRound;
            Round.Begin();
        }
示例#3
0
        private void OnTick()
        {
            Round?.Tick();

            if (IsClient)
            {
                // This is a hack for networking. I hate it. I hate it. We must fix this in the future.
                if (_lastRound != Round)
                {
                    _lastRound?.End();
                    _lastRound = Round;
                }
            }
        }