Exemplo n.º 1
0
        /// <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);
        }
Exemplo n.º 2
0
 public bool HasBehavior <T>() where T : Behavior
 {
     return(Behaviors.FindFirst <T>() != null);
 }
Exemplo n.º 3
0
        /// <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);
        }
Exemplo n.º 4
0
 public T FindBehavior <T>() where T : Behavior
 {
     return(Behaviors.FindFirst <T>());
 }