Esempio n. 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);
        }
Esempio n. 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;
		}