Пример #1
0
        public static PacketReceiveProfile Acquire(int packetId)
        {
            if (!BaseProfile.Profiling)
            {
                return(null);
            }

            PacketReceiveProfile prof;

            if (!mProfiles.TryGetValue(packetId, out prof))
            {
                mProfiles.Add(packetId, prof = new PacketReceiveProfile(packetId));
            }

            return(prof);
        }
Пример #2
0
		public static PacketReceiveProfile Acquire( int packetId ) {
			if( !BaseProfile.Profiling ) {
				return null;
			}

			PacketReceiveProfile prof;

			if( !mProfiles.TryGetValue( packetId, out prof ) ) {
				mProfiles.Add( packetId, prof = new PacketReceiveProfile( packetId ) );
			}

			return prof;
		}