Beispiel #1
0
        /// <summary>
        /// Registers a title.
        /// </summary>
        /// <param name="title">The title to register.</param>
        /// <returns>true if successful.</returns>
        public static bool RegisterTitle(IPlayerTitle title)
        {
            if (title == null)
            {
                return(false);
            }

            Type t = title.GetType();

            if (m_titles.Any(ttl => ttl.GetType() == t))
            {
                return(false);
            }

            m_titles.Add(title);
            return(true);
        }
Beispiel #2
0
        /// <summary>
        /// Registers a title.
        /// </summary>
        /// <param name="title">The title to register.</param>
        /// <returns>true if successful.</returns>
        public static bool RegisterTitle(IPlayerTitle title)
        {
            if (title == null)
            {
                return(false);
            }

            Type t = title.GetType();

            foreach (IPlayerTitle ti in m_titles)
            {
                if (ti.GetType() == t)
                {
                    return(false);
                }
            }
            m_titles.Add(title);
            return(true);
        }
Beispiel #3
0
		/// <summary>
		/// Registers a title.
		/// </summary>
		/// <param name="title">The title to register.</param>
		/// <returns>true if successful.</returns>
		public static bool RegisterTitle(IPlayerTitle title)
		{
			if (title == null)
				return false;
			
			Type t = title.GetType();
			
			if (m_titles.Any(ttl => ttl.GetType() == t))
				return false;
			
			m_titles.Add(title);
			return true;
		}
Beispiel #4
0
		/// <summary>
		/// Registers a title.
		/// </summary>
		/// <param name="title">The title to register.</param>
		/// <returns>true if successful.</returns>
		public static bool RegisterTitle(IPlayerTitle title)
		{
			if (title == null)
				return false;
			
			Type t = title.GetType();
			foreach (IPlayerTitle ti in m_titles)
			{
				if (ti.GetType() == t)
					return false;
			}
			m_titles.Add(title);
			return true;
		}