예제 #1
0
파일: Thing.cs 프로젝트: arty1901/WheelMUD
        /// <summary>Asks the behavior manager whether this thing has the behavior specified in the type parameter.</summary>
        /// <typeparam name="T">Any <see cref="Behavior"/> type.</typeparam>
        /// <returns>True if the behavior was found, otherwise false.</returns>
        public bool HasBehavior <T>() where T : Behavior
        {
            T behavior = Behaviors.FindFirst <T>();

            return(behavior != null);
        }
예제 #2
0
파일: Thing.cs 프로젝트: biggsk81/WheelMUD
 public bool HasBehavior <T>() where T : Behavior
 {
     return(Behaviors.FindFirst <T>() != null);
 }
예제 #3
0
파일: Thing.cs 프로젝트: arty1901/WheelMUD
        /// <summary>Finds the behavior in the behavior manager.</summary>
        /// <typeparam name="T">Any <see cref="Behavior"/> type.</typeparam>
        /// <returns>A behavior if one is found, otherwise null.</returns>
        public T FindBehavior <T>() where T : Behavior
        {
            T behavior = Behaviors.FindFirst <T>();

            return(behavior);
        }
예제 #4
0
파일: Thing.cs 프로젝트: biggsk81/WheelMUD
 public T FindBehavior <T>() where T : Behavior
 {
     return(Behaviors.FindFirst <T>());
 }