public T GetBehaviour <T>() where T : Behaviour
 {
     return(Behaviours.OfType <T>().FirstOrDefault());
 }
Exemple #2
0
 public IEnumerable <DamageBehaviour> OffensiveDamageBehaviours()
 {
     return(Behaviours.OfType <DamageBehaviour>()
            .Where(behaviour => behaviour.Flags.HasFlag(BehaviourFlags.Offensive))
            .OrderBy(behaviour => behaviour.ModifierType));
 }