Beispiel #1
0
        public static void ReadWarmup(PacketReader stream)
        {
            string name = stream.ReadString();

            if ((activeTODef = TODef.TryGet(name)) == null)
            {
                throw new Exception("TODef not found: " + name);
            }

            phase        = TOPhases.Warmup;
            phaseEndTime = GameTime.Ticks + WarmUpDuration;
            OnPhaseChange?.Invoke();

            TOMessage(string.Format("Team Objective '{0}' startet in wenigen Sekunden!", name));
        }
Beispiel #2
0
        public static void ReadGameInfo(PacketReader stream)
        {
            phase = (TOPhases)stream.ReadByte();
            if (phase != TOPhases.None)
            {
                string name = stream.ReadString();
                if ((activeTODef = TODef.TryGet(name)) == null)
                {
                    throw new Exception("TODef not found: " + name);
                }

                phaseEndTime = GameTime.Ticks + stream.ReadUInt() * TimeSpan.TicksPerMillisecond;
            }
            Menus.TOInfoScreen.Shown = true;

            OnPhaseChange?.Invoke();
        }