/// <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); }
public bool HasBehavior <T>() where T : Behavior { return(Behaviors.FindFirst <T>() != null); }
/// <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); }
public T FindBehavior <T>() where T : Behavior { return(Behaviors.FindFirst <T>()); }